LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the data type of an OPC item

Hi,

 

I am building a project that will read/write OPC items from/to an OPC DA 2.0 server. I am using DataSocket.

 

How can I get the type of an item using LabVIEW? I will need this information to convert the Variant data that is returned from DataSocket Read.

 

Browsing the server with the OPC Quick Client I can see the 'Data Type' of an item, so it must be published by the server for sure.

 

 

Regards,

Tamas

0 Kudos
Message 1 of 3
(1,066 Views)

Hi Tamas,

 

DataSocket doesn't return datatype of variable.

May be you can use OPC Quick Client and save variables and datatype in file.

And use this file for your datatype conversion.

Check this video for variable export.

 

BR,

Aniket

0 Kudos
Message 2 of 3
(1,023 Views)

Hi Aniket,

 

Hmm, I was afraid of this...

 

I would avoid using the Quick Client. The application is using the Datasocket Select URL to select an item that we want to monitor/control. Which gives a nice user experience.

The Quick Client is a bit cumbersome to use...

 

Anyhow thanks!

I think I will look into some C#/VB/Python code to get the data types of the items that were selected...

Probably the Quick Client also uses something like that...

 

 

Regards,

Tamas

 

0 Kudos
Message 3 of 3
(1,020 Views)