OPC UA – Add EngineeringUnits in the model16 min read
After discussing the creation of a model, some users have come across the need to add the OPC UA EngineeringUnits field. In this short article we are going to look at an example of how we can add this property to our variables in order to specify the engineering units.
OPC UA Model
To quickly get to the point, let us immediately define a model very similar to what we have already seen in the dedicated article:
Copy to Clipboard
In this scenario, we have first defined a data type called MotorConveyor (lines 7-13) in which a Speed variable of analogue type is defined (lines 10-11). This is followed by the definition of a MachineType object (lines 15-21) which consists of an instance of MotorConveyor called, precisely, Conveyor.
So, now that we have created our model, the objective is to add the EngineeringUnits property to the Speed variable of our Conveyor. Doing so is very simple, we just need to insert an attribute so that it is available to those who connect to our server.