Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Default ValueRank for Generated/Instantiated Variable
September 3, 2015
20:55, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 144
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Parts of an addressSpace are loaded from a nodeset.xml file, containing some UAVariables besides other nodes. UAModeler does not create explicit ValueRank attributes for all variables.
When the SDK ModelLoader instantiates the UaVariable nodes, the ValueRank attribute is set to -2 (ANY) for those nodes, which have not a valueRank attribute in the nodeset. While this may technically acceptable, it is not what I expected or need, as UAModeler displays “SCALAR” as the default ValueRank

Is there any way to configure the ModelLoader to change the default ValueRank to -1 (SCALAR)?

Thanks,
Hans-Uwe

September 4, 2015
8:18, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1026
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Currently there is no other way, other than making it scalar in the model. The reason why it defaults to -2 is because that is what specification states for the BaseVariableType. It was the best catch-all default. If the value given would not be scalar, we might get error trying to set a non-scalar value to a scalar node.

…….. (thinking period) …..

I was wondering why UaModeler uses the -1 as a default since -2 would make more sense (in my opinion). It seems the https://opcfoundation.org/UA/2011/03/UANodeSet.xsd schema does define the default ValueRank to be -1.

I need to talk with Jouni on how to continue..Probably some switch at least need to be added (or the default behaviour changed). I do remember that there was some problems earlier (back some time it was -1 for Variables, not supported at all for VariableTypes).

– Bjarne

September 4, 2015
12:46, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 144
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hi,

as a workaround a created a little groovy script to add ValueRank attributes to all UAVariable and UAVariableType nodes in the nodes.xml, which have not already been assigned such attribute. I added this script to my build script.

But…
If the UANodeSet.xsd defines a default of -1, then UAModeler is working okay and the Java SDK NodeSet parser should probably be modified to also default to -1 (SCALAR)

– Hans-Uwe

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online: mithun
57 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 738

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1