14:57, EET
February 14, 2020
16:30, EET
April 3, 2012
Hi,
Can you be more exact in how they “cannot be used”? Preferably give the answer as code using the SDK instead of a more written explanation.
This is a topic that can be confusing because some servers have their custom logic, e.g. some servers have String-NodeIds that have the “array brackets” i.e. ‘[‘ ‘]’ as part of the NodeId, but in there they are just normal characters (like ‘a’) of a String as part of a NodeId, not any “special array accessor syntax” like you would use in code (basically it is a separate node, with linked data, how exactly it is done in the server implementation it is outside of the spec).
OPC UA does have an array-accessor logic, but it is made to the main, “full-array-node” by specifying an IndexRange as part of the Read/Write call.
11:22, EET
February 14, 2020
13:23, EET
April 3, 2012
14:09, EET
February 14, 2020
14:35, EET
April 3, 2012
Basically that is a custom logic made by Siemens, not part of the OPC UA Specification. Like it is OK per se: no specification rules are broken via this logic, but it is not something you should expect from any server by default. I do not know if KepServerEX supports this, you must ask them.
Our own SDKs do not support this automatically either (you could make such somewhat with manual work though).
Any server is free to expose the array elements as nodes, but the spec doesn’t specify how. There exists an ExposesItsArray ModellingRule, https://reference.opcfoundation.org/Core/Part3/v105/docs/6.4.4.4.3, but it specifically even states: “The BrowseNames of those instances are not defined by the ModellingRule. In general, it is not possible to get a Variablerepresenting a specific entry in the array (e.g. the second). Clientswill typically either get the array or access the Variablesdirectly, so there is no need to provide that information.”
Technically nodes can do the exposing without the modelling rule (it is just data and nodes), but the point was to basically say there is no specified rules that how it is to be done, if at all (though, for a node using the modellingrule ExposesItsArray it must be done, but it is unspecified how). I suspect one reason is that the OPC UA Diagnostic model has a weird array node whose exposed elements are nodes that are part of a larger TypeDefinition, thus their BrowseNames are locked by the TypeDefinition already thus they cannot be changed (so every array element has identical BrowseName, this too is allowed).
So basically Siemens have just chosen to use String NodeIds, and make subnodes whose NodeId is the “parent+[index]”, or something like that, but OPC UA wise the NodeId there is just raw String characters data i.e. a NodeId with e.g. “parent[idx” (without closing ‘]’) would be as valid of a NodeId as this one is, i.e. it is purely server side implementation specific how it interprets the NodeId.
The only “OPC UA Way” to access a subselection of an array is to use an IndexRange, but I do not know if that is possible with UaExpert. Our Browser application doesn’t support it (though maybe we should add it at some point). With the SDK you can set it as part of Read/Write and MonitoredDataItem (call setIndexRange before adding the item to the Subscription), though this will only work if the server supports this.
P.S.
Also, there might be some additions in 1.05 regarding Structures, but I will look that later.
Most Users Ever Online: 1919
Currently Online:
11 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: 6451
Newest Members:
jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettingerModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1