LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array as a Shared OPC Variable in 8.0

Hi
 
I want to transfer an Array over the OPC Protocol. If I do this with the Shared Variables in the Library of the Project, it only works for any singles,doubles, UI 8 - 64, and so on, but not with any kind of Array. That means I  can´t get the data with an OPC Client.  I use the LabView Version 8.0 with the DSC Module installed.
 
It works in Version 8.2, which is quaint!!!
 
I suggest, that  the Variable engine is unable to handle any Array.
Is there a known difference between the 8.0 VariableEngine and the 8.2 VariableEngine??
 
There is a way to handle the problem by using the DataSocket. In the Properties you can bind the indicator ("DataBinding"). There you tell the variable Engine to use the OPC Protocol for an existing SharedVariable(NO matter what kind that is!!) The Engine transmitts the Value of the Indicator.
 
But there should be the much easier way!! By selecting a Shared Variable in the Library of the Project, I hope!
 
Thank you for trying to help.
 
OliN
0 Kudos
Message 1 of 3
(3,969 Views)

Dear OliN

According to this KB article
http://digital.ni.com/public.nsf/websearch/19FF0873E83EBCA986256BDF005F6B39?OpenDocument
you can't write arrays with DataSocket on an OPC server at this time.

Best regards

Philipp Roessler

 

Message 2 of 3
(3,907 Views)
Thanks for the info-link. So I learned more about datasocket.
 
But I am really astonished, because I am able to write an Array with the OPC-Protocol over DataSocket. I don´t need any other sofware like Kepware-OPC-Client or the DSC-module.
 
I will describe my way:
 
  1. create an new Shared-Variable "test" in the library "testlib"in the Project manager. The type can be double, string or even boolean.
  2. then I select an Array in my VI. I change the properties in the DataBinding section to DataSocket and type the URL : "opc://localhost/National Instruments.Variable Engine/\\.\testlib\test"
This way works! My OPC Explorer is able to read the values.
 
Suprising is also, that the Shared-Variable must not be any kind of array or some other types like I16, UI16...I didnt try every type but I can say that it works with DOUBLE,STRING and BOOLEAN.
 
I have no clue why that works!!
 
I appended an example:
0 Kudos
Message 3 of 3
(3,890 Views)