LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read tags from OPC serwer by LabWindows?

Hi,

I have RSLinx installed on my computer. When I run an example OPCClient from help in LabWindwos there is no problem to observe actuall value. But this example is not very clear for me... Can somebody write here a code for this? A simple code wich is reading data from one tag and putting this data to String box. Please help.

Thanks.

0 Kudos
Message 1 of 2
(2,838 Views)

Hello prepond,

 

You have a few options here. If you take a look at the code in the example you can see that "theValue" is where the variable is being stored to with DS_GetDataValue and then plotted. You could simply use a string box and set the value to "theValue" immediately afterwards.

 

A second and easier way would be to put down a string control, right click and select "edit control" then choose the "datasocket binding" option. Enable binding and choose the server and you will see the value update automatically.

With warm regards,

David D.
0 Kudos
Message 2 of 2
(2,814 Views)