Search code examples
opcopc-ua

OPC UA and data representation


Hi I am investigating OPC UA for my organization. I am trying to work out an example for a presentation based on an information or data example.

I have one for a on demand read operation and one for a continuous monitor. What I don't quite understand since I am just learning and haven't picked a vendor yet (lean towards United Auto) is how is the data represented?

For example if I have a data struct or object called machineInfo with 13 attributes (data) how would I create that on the server side and show how its done?

How would it fit in the BaseNode, Variable hierarchy? Or am I way off?

I can show high level or just code.

Thanks


Solution

  • MachineInfo would be an Object node (NodeClass of Object), with HasComponent references to each of the 13 attributes, which themselves would be Variable nodes (NodeClass of Variable).

    As far as type definitions go, you could start out with just using the BaseObjectType and BaseDataVariableTypes, but if you're going to be using a client capable of taking advantage of more complex types you could create a custom ObjectType for the object. The variable components could be further exposed as AnalogItemType or DiscreteItemType, if applicable...

    What programming language/SDK are you leaning towards?