LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change what data type data socket requests from OPC server

I suspect this is a foregone conclusion, however just in case; is there a way to make Datasocket request items from an OPC server in a different data type than variant?

I have a server that scales integers (native data type) and offers tham as floating point values, however to get those nice floats the client must request the data in the right type. If the client asks for a variant the server will return the integer value (e.g. 2 instead of 2,36...).

I have not checked whether this is a server behaviour as it must be (according to OPC specs) or if it's just a choice by the vendor (Automated Solutions), but still it may become an obstacle.

Has anyone implemented OPC Client functionality without using Datasocket (and server for that matter)? Any software componants you can recommend?
0 Kudos
Message 1 of 4
(2,751 Views)
Hi Mats

I once found vi's (..\vi.lib\Platform\dataskt.llb) with different read- and write-types. In fact they are all wrapping up the read- & write-variant functions.

I use them to communicate with Siemens OPC-Scout and it works. They make life a little easier ;).

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 4
(2,750 Views)
Yes, I use those...it's the fact that they just wrap around the variant based call that cause the problem.

I need data socket to actually request a VT_R4.
0 Kudos
Message 3 of 4
(2,748 Views)
I see.

So I think I can't help you - sorry.

I just read these I32 values and convert them by myself. The value represents a boolean array but I also can't read this array directly, because it's just offered as an int-value.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 4
(2,743 Views)