LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No connection between OPC client and labveiw

Hello,

I use dsc module to connect to OPC server. I created UA client using OPC servers configuration. Then i watched tutorial http://www.ni.com/webcast/273/en/ and bound needed variables, so i can read/write them using labview. But when labview is running, it doesnt connect to the server every time and can lose connection during working. Moreover, sometimes it takes lots of time to write/read variables. What can be the problem?   

0 Kudos
Message 1 of 6
(922 Views)

Try using front panel binding to your OPC server to check connection's and if the problem is with DSC or the Server. You can also use the datasocket vi's to programatically connect to the OPC server . This gives you more control because you can then set the timeout values.  If you use front panel bindings it is easy but you are at the limitations and settings of windows. (Com and DCom settings for the OPC Server Security settings) and the OPC server settings(timeout, polling rate,conection settings).  is the lib file properly deployed that is created by the DSC module?

0 Kudos
Message 2 of 6
(901 Views)

Hey Katerina,

 

It is important to distinguish between OPC UA and OPC DA. You mention setting up an OPC UA client, but then you say you used bound variables (bound to OPC DA data items). These protocols are not compatible without a server to connect them.

 

If you desired to use OPC UA, you'll have to use the LabVIEW API which was added in 2012 sp1 if I am not mistaken.

 

If you desired to use OPC DA, bound variables will work but you'll need to ensure your OPC server is configured correctly. If you are currently bound to OPC DA variables which are in turn bound to OPC UA variables in the client you generated, my guess would be that the errors and slow read/write speeds are indeed the correct behavior.

 

What are you attempting to communicate with? A PLC? Shared variables?

 

Thanks,

Daniel

0 Kudos
Message 3 of 6
(868 Views)

I am trying to connect to Siemnent Microbox. So i try to connect to  PLC via OPC server.  How can i use API? do you have any expample? 

 

0 Kudos
Message 4 of 6
(833 Views)

If you need to use OPC UA, the example ships with the product and can be found in the example finder.

 

If you need to use OPC DA, the video you followed should be sufficient.

 

My main point about what you want to do is this:

Are you trying to connect LabVIEW directly to your controller? If so, does the device support OPC UA? If yes, use the API.

In any other case I can think of, you'll have to use the OPC server to communicate with the controller, and then use EITHER LabVIEW DSC OPC I/O servers OR a OPC UA driver in your OPC server communicating with the OPC UA API in LabVIEW. My guess is that using the I/O servers is better, and what you want to do.

 

If thats the case, follow that video to communicate with the OPC server and confirm that  you can grab data from the server using I/O servers. If not, thats where you would investigate settings as Dave suggested above.

0 Kudos
Message 5 of 6
(814 Views)

Siemnent Microbox? Do you mean Siemens Microbox. Is this were the OPC Server is Run? What is the OS your OPC Server runs on. If it is a remote machine? . You need to check the security settings to allow remote clients if the Server is not on your machine you have your vi running. Have you also tried NI OPC server's OPC Server Quick Client?  This will test the OPC server connection to ensure you have access to the server and can browse tags and get values from the server.

0 Kudos
Message 6 of 6
(799 Views)