Initial value of attributes of a BaseDataVariable node

Questions regarding the use of the High Perfomance SDK for Server development

Moderator: uasdkhpc

Post Reply
AnnieFYWu
Full Member
Full Member
Posts: 5
Joined: 18 May 2018, 09:54

Initial value of attributes of a BaseDataVariable node

Post by AnnieFYWu »

Hi,

If I want to create an one dimension array BaseDataVariable node, and the array with 3 items. Do I need to set the "ArrayDimensions" attribute to 3?
How about the initial value of the "Value" attribute(include the timestamp and value)?

Thanks.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: Initial value of attributes of a BaseDataVariable node

Post by Support Team »

For an one dimensional array with length 3 the attributes need to be set like this:
ValueRank=1
ArrayDimensions = [ 3 ]

ArrayDimensions is just the maximum length possible for this variable.
The actual value can always be shorted.
The value itself contains the length of the array data.

> How about the initial value of the "Value" attribute(include the timestamp and value)?
I'm not sure what you mean with that.
If the problem is that you don't have an initial value, you can set the StatusCode
to UA_SCBADWAITINGFORINITIALDATA, value=empty, timestamp=time when you set this information.
Best regards
Unified Automation Support Team

Post Reply