LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble connecting to an OPC server

Hi guys,

 

The problem is connecting to a mass spectrometer, for which I have a dedicated LAN cable connection and an IP address. I can ping the device, and connecting to the OPC server works with the Softing OPC client, by manually entering the IP address of the server. However it does not show up in the remote machines list when I try to connect to it with via new I/O server. Is there a way to connect directly to an OPC server having only it's IP address?

0 Kudos
Message 1 of 22
(9,892 Views)

Still I have not solved this problem. Maybe I should put up more specific information?

 

* I'm using LabVIEW 2009 with the DSC module

* I want to connect with an OPC server on a device which is directly connected to the PC via ethernet cross cable.

* The OPC device does not show up as a windows PC in the network list, but I do have it's IP address

* Connecting to the OPC device works fine with the Softing OPC client in manual mode

 

Can anybody give some suggestions on how to connect to this OPC device from LabVIEW?

0 Kudos
Message 2 of 22
(9,858 Views)

Hi,

 

What is OPC-server version maybe DA 2.0 or lover? I have noticed that it is normal that you cannot browse OPC-items from LV. When you set OPC server IP address to LV IO-server can you find your OPC server prog id from list?

 

If you find it you can manually program variables. You just need to write OPC-item names to variables. Variable will be connected even it is not browsable.

0 Kudos
Message 3 of 22
(9,848 Views)

Dear JasperS,

 

did you register the OPC server to your shared variables? Please use tools => shared variables => register computer

here you can fill up the correct IP address. I found also this KB if you have any further troubles.

 

Best regards,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 4 of 22
(9,840 Views)

Hi SnowForest: From what I gather from the Softing client is that it is actually running both a 2.0 and a 3.0 OPC server. If I manually enter the IP address into the 'machine' field it gives the following error:

 

----------------------------------

Unable to browse OPC Server from the selected machine.

Error -2147467262 occurred at GetOPCServerList.vi

Possible reason(s):

LabVIEW:  (Hex 0x80004002) No such interface supported.

----------------------------------

0 Kudos
Message 5 of 22
(9,835 Views)

Dear ninImartijn,

 

Thank you for the suggestion and the document.

 

After registering the server it shows up in the list when I try to make a shared variable. Still it is empty there. And also it does not show up in the list when creating a new I/O server. Is there more I should do? I haven't worked with the shared variable engine before.

 

I do not think the KB will help, as the machine should accept any login. Also the question there is to connect to it with DSC after DS is already working. I already tried to get DS working following the OPC examples in LabVIEW, but that doesnt work for me either (error 56 from the DataSocket Open block).

 

Any ideas?

0 Kudos
Message 6 of 22
(9,832 Views)

Can you send a screenshot of pop-up window where you wrote a machine name? Also send a screenshot about one variable settings which you want link via OPC. As I said it normal that OPC-server it is not browsable. I get that error often but still my OPC-communication works fine.

 

Have you tryed set set diagnostics on from IO-server? It will print a log file about OPC-commuincation. There might be a useful errors and messages.

 

Have you compared DCOM settings between your own OPC-client and LabVIEW shared variable engine? 

 

Check this document: http://digital.ni.com/public.nsf/allkb/5C8A90CD57B279F286256C2C006F1EB4

0 Kudos
Message 7 of 22
(9,825 Views)

Hi SnowForest, thanks for your suggestions!

 

I have included a screenshot of my situation. On top you can see the Softing OPC client connected to the server with some of the variables I want to link. Below is LabVIEW which gives an error when I enter the IP address in the 'machine' field.

 

The document you link to assumes that the server is running Windows and I can modify its network settings. I don't believe it is running Windows. The OPC server is a given to me, and I should just connect to it like the Softing client is doing.

 

Maybe the screenshot gives you some ideas?

0 Kudos
Message 8 of 22
(9,763 Views)

Hi,

 

I'm strongly think that major problem is DCOM settings. Because you are able to read variables from other client firewalls and such things might be okay.

 

Have you tested browse variables with server explorer? You can find it here: http://joule.ni.com/nidu/cds/view/p/id/569/lang/en

 

 

Have you done these (which is described previous link suggestion): 

 

On the client side, reconfigure National Instruments' Variable Engine service to run as a specific user account that has been granted DCOM privileges. To reconfigure the National Instruments Variable Engine follow the steps below

  1. Go to Control Panel»Administrative Tools»Services
  2. Stop running National Instruments Variable Engine service
  3. Right click on National Instruments Variable Engine and select Properties.
  4. Under Log On tab select This Account and enter the user account information which has been granted the DCOM privileges and apply the settings.
  5. Start the National Instruments Variable Engine service.

 

Message 9 of 22
(9,734 Views)

Our lab was shut down for the holidays period, so I couldn't try anything for a while. Back on it now though. 🙂

Thanks for your suggestions! However, I still can't reach the server. Some more details in this post.

 

  • The server explorer doesn't see the device either. I think both the server explorer and LabVIEW actually browse the network looking for machines running some kind of Samba (SMB) server? That's at least suggested by the characteristic '\\' added to the machine name I put in there. I don't think the Mass Spectrometer is running an SMB server. It does run http and OPC servers, and I believe that's it. So it's not 'visible' on the Windows network. Is that a problem?
  • When I enter the IP address of the machine at the new IO server window, it automatically adds the '\\' in front and gives the 'No such interface supported' error described in the previous post. When I put in the IP address of a non-existing machine it gives a different error ('The RPC server is unavailable') after a few seconds. So it does seem to know there is a machine there, just it can't interface with it.
  • Reconfiguring the client side DCOM settings according to recipe above didnt seem to make a difference.

Anyone?

0 Kudos
Message 10 of 22
(9,593 Views)