05/15/2019
Since one can create a structure for DataType as well and VariableType . eg. In Unified Automation OPC UA Simuation Server, there are WorkOrderType as DataType and WorkOrderVariableType as VariableType whereas the variable created under Scalar is WorkOrder whose DataType is WorkOrdeType. I am trying to understand what purpose does VariableType serve if the same could be achieved by creating custom DataType.
05/30/2017
Variables represent Values that can be read, written or subscribed.
They are used to represent things in the underlying system which often have additional associated information such EngineeringUnits which are represented as child Variables.
DataTypes define what is physically passed between the client and server (the blob that is read or written).
Each instance of a DataType is read, written and subscribed to as a unit.
So if you have structure representing a WorkOrder as the Value of the WorkOrder Variable then you can can subscribe to the Variable and get the entire WorkOrder in the update.
However, a lot of OPC HMI clients make it easy to grab something in the address space and attach it to UI element such as label. Burying a piece of information like the WO# in custom structure will make it more difficult for some clients to access that information. For that reason, a Server can choose to add WorkOrderNumber Variable which is a component of the WorkOrder Variable. This makes it easier for the Clients to access key subsets of the information in the Structure.
The decision on what information in a structure to expose as subvariables is up to the Server. The decision should be based on how clients are expected to use the information provided.
1 Guest(s)