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: 135
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: 983
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: 135
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: 518

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

TimK: 41

Member Stats:

Guest Posters: 0

Members: 682

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1