Question about ArrayDimensions attribute of Variable NodeClass|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Question about ArrayDimensions attribute of Variable NodeClass
Avatar
Annie Wu
Member
Members
Forum Posts: 8
Member Since:
09/04/2017
sp_UserOfflineSmall Offline
1
09/07/2018 - 02:03
sp_Permalink sp_Print

Hi,

I have a question about ArrayDimensions attribute of Variable NodeClass.

In Spec Part 5 Information Model Chap5.3 mention that “If the ValueRank does not identify an array of a specific dimension (i.e. ValueRank <= 0) the ArrayDimensions can either be set to null or the Attribute is missing. This behaviour is server-specific.
If the ValueRank specifies an array of a specific dimension (i.e. ValueRank > 0) then the ArrayDimensions Attribute shall be specified in the table defining the Variable.” But in Spec Part 3 Address Space Model Chap 5.6.2 Table 13, it displays that  attribute ArrayDimensions is optional.

My question is : if I add a node of Variable NodeClass and set the ValueRank to 1, does the ArrayDimensions attribute become mandatory and I have to specify the ArrayDimensions attribute when I add node?

 

Thanks.

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOnlineSmall Online
2
09/07/2018 - 04:34
sp_Permalink sp_Print sp_EditHistory

This seems like an inconsistency in the specification.

Please add a mantis issue so the WG can review and publish a clarification.

https://opcfoundation-onlineap…..n_page.php

My initial response is that the array dimensions is always optional.

Avatar
David Levine
New Member
Members
Forum Posts: 1
Member Since:
06/03/2016
sp_UserOfflineSmall Offline
3
11/09/2018 - 10:46
sp_Permalink sp_Print

Hello,

I have found that the ArrayDimension attribute cannot be relied on to provide information about the actual size of an array even if ValueRank is > 0. Part 3 of the spec calls for it to contain the maximum supported length, not the actual current length.

Even if this is set to a specific value at one instant the spec does not prevent a server from changing it. The only reliable way I have found to determine what the current dimensions and length of each dimension is set to, is to read the entire array (read without using an NumericRange).

 

Thanks

David Levine

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online: Randy Armstrong
Guest(s) 38
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889