LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem OPC server datasocket display real voltage

I use an interface box Advantech ADAM 5000/TCP ethernet ( +/- same Compact Fieldpoint ) and a 16 analog inputs channels bloc. I generate a signal from a device, value for this signal is 1.35 Volts by example or all real voltage ( between 1.xxx and 5.xxxx Volts ). I use an Advantech OPC server. I read this value with Labview 7.0 and datasocket connection. I want display this value in a waveform graph and a numeric display. When I start application I see the correct value during 1 second, after this time, value is rounded to 1 Volt ( by example ) or truncated.

Example : If real value generated is 1.350 Volts, when program start, during one second, this value is displayed correct 1.350 inside the graph and the numeric di
splay. After this time, the graph display a continues line with a value 1 Volt. But inside OPC Server this value is correct all time 1.350 Volt.

I use a While Loop for including a "Read DS", a "Variant to Data" transformer and a Graph + a display numeric value. Setting for all is DBL ( Dubble ) No timeout is using and the conversion data type for variant is a constant 0,000000.

What could be the problem ? Thanks.
0 Kudos
Message 1 of 2
(2,542 Views)
Hi Daniau,

Here is a tutorial that explains how to connect LabVIEW to an OPC Server via DataSocket.

It is odd to hear about this type of behavior in LabVIEW, where the first unit of data is correct, but everything after that appears "truncated" or "rounded". Since your initial data is displayed correctly, I would go as far to say that the connection between the OPC Server and LabVIEW should be fine. However, to ensure that this problem is related to receiving data in LabVIEW and not in the computer, I would try to monitor this data using any other available software on the development (LabVIEW) computer just to make sure it is the reading application a
nd not the source. Also, based on your description of your While Loop, it may be worthwhile to try a slight modification. Remove your Variant to Data VI, and take your Double (DBL) constant and wire it into the Read DS 'type' parameter. This is essentially the same thing as you had before, but it may resolve the "truncating" issue. Hope this helps. Let me know if you need any more help, and I will be more than happy to assist you further. Good Luck!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 2
(2,542 Views)