LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does'nt my Datasocket work with OPC tunneller??

Hi, im using a read datasocket to communicate with an OPC tunneller (Matrikon). But the datasocket does not recieve any data, when changing the opc url to a local host url. Ive used 3rd party clients other than the datasocket and they work fine. What could it be??

0 Kudos
Message 1 of 4
(3,261 Views)

Hi there

 

My first step would be to make sure you are connecting to the OPC server correctly. Please follow the below link to how you can accomplish this:

Connecting LabVIEW to an OPC Server through a DataSocket Connection

 

I have also linked the; DataSocket Tutorial. This is a great reference to have when using the DataSocket connection.

 

Make sure you enter a valid OPC URL into DataSocket Read or DataSocket Write VIs (see attached example: dsopc.vi). As the first step in accessing an OPC server, DataSocket will establish a connection by launching the relevant OPC server. If you are running Windows 2000/XP, you will see the relevant OPC server running as a process. When the VI is stopped, the process is shut down.

 

The appropriate URL format to subscribe to an OPC Server is opc://ServerName/OPCServer/ItemName

.

  • Again, ServerName is the computer on which the OPC Server is currently running.
  • OPC Server is the name of the OPC Server (eg. National Instruments.OPCDemo).
  • ItemName is the OPC Item to which you are subscribing.

Many experienced OPC programmers also want to include certain configuration settings in their subscriptions. Therefore, National Instruments has made it possible to configure your subscription including the OPC Server Deadband and the OPC Server Update Rate. There is a simple way to include this in your URL: opc:\\ServerName\OPCServer\ItemName?updaterate=100&deadband=0.7.

This is similar to the previous URL except for the addition of the update rate and the deadband configuration. Again, similar commands are available in other programming languages.

 

Can I ask do you have the DSC module? Can you supply me with some more information if the above steps do not resolve your issue. Many thanks!

 

 

 

Many thanks for using the NI forums and I look forward to your reply.

Kind regards

David

Applications Engineer
National Instruments UK
0 Kudos
Message 2 of 4
(3,246 Views)

Hi, already tried what you suggested. I do have the dsc module as well. It seems the datasocket can retrieve the data from the client tunneller(localhost).

 

Stuart

0 Kudos
Message 3 of 4
(3,224 Views)

Found out it was the tunneller that did work with datasocket. So i used a different tunneller and it worked fine.

0 Kudos
Message 4 of 4
(3,191 Views)