OPC UA communication
9.3 Using the S7-1500 as an OPC UA server
Communication
266
Function Manual, 05/2021, A5E03735815-AJ
User-defined data type for UNION required
The figure below shows the tag "MyVariable", which has the "Union_MyDatatype" data type.
This SIMATIC data type corresponds to an OPC UA tag with the data type UNION.
The figure shows an example of the declaration: When Selector = 1, Union takes a ByteArray;
when Selector = 2, Union takes a WString.
Using other OPC UA basic data types
Apart from the OPC UA data types listed in the section "Mapping of data types" and their
correspondences on the SIMATIC side, there are the following OPC UA basic data types which
you can also use:
•
OpcUa_NodeId
•
OpcUa_QualifiedName
•
OpcUa_Guid
•
OpcUa_LocalizedText
•
OpcUa_ByteString
•
OpcUa_XmlElement
Requirement for the use of the basic data types listed above as variables in the application
program: The basic data types have to exist as complex data types that are structured exactly
like the corresponding OPC UA basic data types.
•
OpcUa_NodeId and OpcUa_QualifiedName exist as system data types; that's why you can
use these data types not only for single variables but also as elements of a structure.
•
For the remaining basic types you have to create a PLC data type in accordance with the
OPC UA specification and subsequently use it as an element in a structure so that the data
types of the elements can be resolved. What each PLC data type must look like is described
below for every single basic data type. "EUInformation" is an example of a data structure
in which, for example, the UDT "LocalizedText" is used. EUInformation contains
information on EngineeringUnits. You can find an example of the implementation of the
EUInformation data structure at the end of the PLC data type descriptions.
Summary of Contents for SIMATIC ET 200AL
Page 2: ......
Page 143: ......
Page 218: ......
Page 250: ......
Page 296: ......
Page 337: ......
Page 365: ......
Page 392: ......
Page 419: ......
Page 451: ......
Page 483: ......
Page 597: ......
Page 648: ......
Page 702: ......
Page 739: ......
Page 781: ......
Page 804: ......
Page 828: ......
Page 853: ......
Page 880: ......
Page 906: ......
Page 996: ...Diagnostics ...
Page 1121: ......
Page 1565: ......