Siemens SIMATIC S7-1500 Function Manual page 216

Hide thumbs Also See for SIMATIC S7-1500:
Table of Contents

Advertisement

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.
Communication
Function Manual, 11/2019, A5E03735815-AH
OPC UA communication
9.3 Using the S7-1500 as an OPC UA server
215

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents