It is possible to create an instance of an object type by using the resource type Cybus::Node::OpcuaObject
Example Commissioning File
Download:
---description:demo for OPC UA objecttype nodesmetadata:name:OPC UA Objecttypes demoresources:opcuaServer:type:Cybus::Server::Opcuaproperties:hostname:192.168.178.46securityModes: ['None','SignAndEncrypt']nodesetFiles: ['di','machinery','ia','machineTool']securityPolicies: ['None','Basic256Sha256']allowAnonymous:trueport:4841parentNodeRoot:type:Cybus::Node::Opcuaproperties:parent:!refopcuaServerbrowseName:cybusnodeId:ns=1;s=cybusnodeType:Object######################################################### Sample of an insance of an# machine tool type. The type "MachineToolType" is# defined in the MachineTool Umati namespace########################################################testMachineToolType:type:Cybus::Node::OpcuaObjectproperties:parent:!refparentNodeRootbrowseName:MyMachineToolTypeTestobjectTypeName:MachineToolTypesourceNamespaceUrl:'http://opcfoundation.org/UA/MachineTool/'
Output Format
The server provides the structure of the object types and its values as a JSON structure as the example:
Writing updates to the OPC UA object type can be achieved by publishing to the <ObjectNodeName>/write topic. The same JSON structure can be used with updated data in the _value items. For data updates on U/INT64 please review the section on BigInt datatypes in OPC UA Server documentation. It is not necessary to update the complete structure. You can also only write a JSON structure that contains the direct value update. To update all values for the example structure above, only the following structure would be required: