ChimeraTK / ControlSystemAdapter-OPC-UA-Adapter

The OPC-UA implementation for the ControlSystemAdapter
GNU Lesser General Public License v3.0
2 stars 4 forks source link

News on data type error with LabVIEW Client #13

Closed ReStone closed 7 years ago

ReStone commented 7 years ago

The item data type read by LabVIEW has been allways "0" in tag v1.0: item data type tag1 0

With tag v1.1 it changed to the value "24": item data type tag1 1

Maybe that tells you something!?

ReStone commented 7 years ago

NI answered a support request concerning the data type issue:

I have tried the Windows 32 bit Demo Server on the following link. And I can read correct data type in the Server nodes.

http://open62541.org/

And then I double checked the two pictures in the original post. I found the "ValueRank" in two pictures are different.

Developer helped check source code for me that we do not support "ValueRank=0" . I think that might be the reason of this issue.

And I checked the Demo Server code; I found it only defines ValueRank = 1 data type. That is why the Demo Server is working well.

BTW, "ValueRank = 1" means the data is one dimension array; and "ValueRank= -1" means the data is a scalar. And currently we don't support "ValueRank = 0".

Additional remarks: LabVIEW seems to read the data type directly from „DataType.Identifier“. This only works when „ValueRank“ != 0

jmrahm commented 7 years ago

Hi, in the current master branch the ValueRank is consequently set to -3, the meaning is "ScalarOrOneDimension" (see IEC62541 Part 3), hence we support both types. Typical scalar values and array with one dimension. I would be glad if you can check the support in LabViwe.

The other Point... currently the stack change a little bit. So the DataType is set to a kind of generic Datatype "BaseDataType" with identifier "24". Therefore the LabView output is "correct". But the more specific Datatype like "int23", "string" etc. should be displayed, we work on a fix for this issue. ;-)

ReStone commented 7 years ago

I just made a build on the master branch. UaExpert had problems to connect to the server. Connection was permanently lost: Server: master_connection_error UaExpert-Log: master_uaexpert_connection_error

Still I could verify the ValueRank -3 for the value nodes - during a GOOD impuls of the connction :).

The LabVIEW Client did read 0 as „DataType.Identifier“ for the "Value" nodes and 24 for the other nodes (Name, Type etc.) that still have ValueRank -1: masterbranch_nodes_with_rank_minus3

I would conclude LabVIEW does only support ValueRanks 1 and -1 (as mentioned in the support request above).

Do we urgently need ValueRank -3? I could write this to NI and see if they are willing to fix it.

Is it possible to to produce a server with "ValueRanks" 1 and/or -1 and correct „DataType.Identifier“ for at least 1 or 2 variables? I want to give NI some feedback on the topic.

jmrahm commented 7 years ago

So finally this issue should be fixed. Every Variable get the more correct ValueRank (1,-1), hence LabView should be happy :-). Additionaly the generic Datatype "BaseDataType" (24) was replaced by the specific Datatypes (int, string etc) .

For disconnection failure I will start a new issue. Until then, please check the correctness during the connection of the fix. If it fails, feel free to reopen this issue. (GitHub closed this issue automatically by writing the issue number in the commit comment)