OPC UA communication
9.1 What you need to know about OPC UA
Communication
170
Function Manual, 05/2021, A5E03735815-AJ
SIMATIC data type
OPC UA data type
DATE
DATE
→ UInt16
TIME_OF_DAY (TOD)
TOD
→ UInt32
LTIME_OF_DAY (LTOD)
LTOD
→ UInt64
DATE_AND_TIME (DT)
DT
→ Byte[8]
LDT
DateTime
DTL
Special note: You can only describe the structure
completely with an OPC UA client. You have read-
only access individual elements of this structure
(e.g. "YEAR")
mapped as structure
CHAR
CHAR
→ Byte
WCHAR
WCHAR
→ UInt16
STRING
(Code page 1252 or Windows-1252)
STRING
→ String
WSTRING
(UCS-2; Universal Coded Character Set)
String
TIMER
TIMER
→ UInt16
COUNTER
COUNTER
→ UInt16
Arrays
A read or write job with OPC UA is always an array access, which means that it always has an
index and length. A single tag is a special case of an array (index 0 and length 1). The data
type is simply sent repeatedly on the line. For the tags, the "DataType" attribute indicates the
basic data type. The attributes "ValueRank" and "ArrayDimensions" show whether or not you
are dealing with an array and how large the array is.
Data types based on arrays
There are SIMATIC data types for which an OPC UA value is mapped to an array of bytes. An
array of these data types is then mapped to a two-dimensional array.
Example: The SIMATIC data type DATE_AND_TIME (DT) is mapped on the OPC UA side to an
8-byte array (Byte[8]), see table above. When you define an array of the SIMATIC data type
DATE_AND_TIME (DT), then it is considered as two-dimensional array.
This fact affects the use of system data types such as OPC_UA_NodeAdditionalInfo and
OPC_UA_NodeAdditionalInfoExt, for example:
For the data types described above, you must use the system data type
OPC_UA_NodeAdditionalInfoExt for multidimensional arrays instead of
OPC_UA_NodeAdditionalInfo.
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: ......