23:52, EEST
April 12, 2018
I am using the Prosys Java SDK to build an OPC UA client to read Device Type attributes such as Serial Number, Model etc as specified by the DI Companion Specification. Can I safely assume that all OPC-UA servers that support the DI Companion Specification would have implemented Device Type in the same namespace with the same node Ids?
Recently, I came across Siemens S71500 PLC which has its own namespace and has a subtype Simatic Device Type which in turn has the components SerialNumber, Model etc. These can be accessed in runtime by looking at their type definition and then in turn checking if the type definition is a subtype of the Device Type node. Or load their information model and know what to look for before hand. These nodes have a different namespace and node id but the browse names are same.
So my question is, When implementing a generalized client, From your experience, Do we have to load the information models from each vendor such as Siemens, B&R or we can assume that there might be anomalies but mostly all vendors would follow the DeviceType information model with same nodeIds with namespace (http://opcfoundation.org/UA/DI/)?
What would be the best way to access the Device Type information model from the servers in a generic way?
14:21, EEST
April 3, 2012
Hi,
All OPC UA Servers that support the DI companion spec should contain the namespace http://opcfoundation.org/UA/DI/. In practice it is best to read the DI spec from https://opcfoundation.org/developer-tools/specifications-unified-architecture/opc-unified-architecture-for-devices-di/ for what is needed and what is optional.
Please note that having the namespace means that it is in the Objects/Server/NamespaceArray, however the exact ordering of those is not defined in UA (except the standard namespace is always 0 and 1 for server specific nodes, usually dynamic e.g. diagnostics nodes required by the specification). Therefore you must always use the namespace uri when storing NodeId values and look up the table after connection UaClient.getNamespaceTable in order to know the correct NamespaceIndex for the NamespaceUri.
Most servers supporting DI should load the DI NodeSet2 XML model and get the same exact address space for that namespace. The model contains the types. In general the instances of types can be in any namespace (I recommend putting them in a different namespace than the types). However the DI spec also defines a node Objects/DeviceSet, from which you should be able to browse all DeviceSet instances. Read the DI spec 1.01 section 5.8. “DeviceSet Entry Point” for more information. Note that a server can also subtype the DeviceType and have instances of that. Still they should also behave as their supertype, so you can look them as DeviceType.
I would start by making the client using the DI model. Note that some of the DeviceType’s Properties and subnodes have HasModellingRule Optional reference. Only subnodes having HasModellingRule Mandatory can be expected from all instances. Please read e.g. OPC UA spec 1.03 Part 3 section 6.4.4.5.2 for more information.
The DI model is one that the SDK has built-in, therefore in practice with SDK version 3.0.0, this could be done e.g. (client being UaClient object):
client.connect();
UaNode node = client.getAddressSpace().getNode(node identifier here);
if (node instanceof DeviceType) {
DeviceType dev = (DeviceType) node;
//e.g.
System.out.println(dev.getSerialNumberNode().getNodeId());
System.out.println(dev.getSerialNumber());
}
And this would work for all DeviceType and subtypes of it (note that it requires SDK 3.0.0 so that it works on non-codegenerated model subtypes as well).
Most Users Ever Online: 1919
Currently Online:
20 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: 729
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech KubalaModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1