Difference between DataType and VariableType |OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Difference between DataType and VariableType
Avatar
Vinod P
Member
Members
Forum Posts: 3
Member Since:
05/15/2019
sp_UserOfflineSmall Offline
1
11/06/2019 - 07:34
sp_Permalink sp_Print

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.

Avatar
Randy Armstrong
Admin
Forum Posts: 1465
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
11/06/2019 - 17:08
sp_Permalink sp_Print sp_EditHistory

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.

Avatar
Vinod P
Member
Members
Forum Posts: 3
Member Since:
05/15/2019
sp_UserOfflineSmall Offline
3
11/21/2019 - 05:21
sp_Permalink sp_Print

Thank you

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 12
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1357
Posts: 4606