The data types in the GSDML file are defined in [GSDML] table 18. Table 58 defines the mapping of GSDML data types to OPC UA data types.
Table 58 – GSDML data type to OPC UA data type mapping
DataType attribute value of Ref element |
Length in bytes |
OPC UA data type |
Comment |
“Bit” |
1 |
0:Boolean |
|
“BitArea” |
Specified by “BitLength” attribute |
0:ByteString |
|
“Integer8” |
1 |
0:SByte |
|
“Integer16” |
2 |
0:Int16 |
|
“Integer32” |
4 |
0:Int32 |
|
“Integer64” |
8 |
0:Int64 |
|
“Unsigned8” |
1 |
0:Byte |
|
“Unsigned16” |
2 |
0:UInt16 |
|
“Unsigned32” |
4 |
0:UInt32 |
|
“Unsigned64” |
8 |
0:UInt64 |
|
“Date” |
7 |
0:DateTime |
=BinaryDate |
“VisibleString” |
Specified by “Length” attribute |
0:String |
|
“OctetString” |
Specified by “Length” attribute |
0:ByteString |
|
“Float32” |
4 |
0:Float |
|
“Float64” |
8 |
0:Double |
|
“Unsigned8+Unsigned8” |
2 |
0:Byte |
Value without status byte. Status returned with StatusCode. |
“Float32+Unsigned8” |
5 |
0:Float |
|
“Boolean” |
1 |
0:Boolean |
|
“UnicodeString8” |
Specified by “Length” attribute |
0:NormalizedString |
According to PNO-2.712, Application Layer services, the UnicodeString8 may contain characters from ISO/IEC 10646. |
“61131_STRING” |
Specified by “Length” attribute |
0:ByteString |
|
“61131_WSTRING” |
Specified by “Length” attribute |
0:ByteString |
|
“TimeStamp” |
12 |
GsdGenIoTimeStampDataType |
|
“TimeStampDifference” |
12 |
GsdGenIoTimeStampDataType |
|
“TmeStampDifferenceShort” |
8 |
0:UInt64 |
|
“OctetString2+Unsigned8” |
3 |
0:ByteString
|
Two bytes in hexadecimal notation, plus status in hexadecimal notation. Status returned with StatusCode. |
“Unsigned16_S” |
2 |
0:UInt16 |
Decimal integer in range of 0 to 16383, plus status: ‘B’ = bad, ‘S’ = simulation, ‘U’ = uncertain, ‘G’ = good.Status returned with StatusCode. |
“Integer16_S” |
2 |
0:Int16 |
Decimal integer in range of -8192 to 8191, plus status: ‘B’ = bad, ‘S’ = simulation, ‘U’ = uncertain, ‘G’ = good.Status returned with StatusCode. |
“Unsigned8_S” |
1 |
0:Byte |
Decimal integer in range of 0 to 63, plus status: ‘B’ = bad, ‘S’ = simulation, ‘U’ = uncertain, ‘G’ = good.Status returned with StatusCode. |
“OctetString_S” |
Specified by “Length” attribute |
0:ByteString |
List of values consisting of byte in hexadecimal notation plus status: ‘B’ = bad, ‘S’ = simulation, ‘U’ = uncertain, ‘G’ = good.Status returned with StatusCode. |
“N2” |
2 |
0:Int16 |
Decimal integer in range of -32768 to 32767. Interpreted as: Value / 16384 %. |
“N4” |
4 |
0:Int32 |
Decimal integer in range of -2147483648 to 2147483647.Interpreted as: Value / 1073741824 %. |
“V2” |
2 |
0:Boolean[16] |
Bit string consisting of 16 single bits. |
“L2” |
2 |
0:Boolean[16] |
Bit string consisting of 4 nibbles (range of 0 to 15). A nibble is a four-bit aggregation, or half a byte. |
“R2” |
2 |
0:UInt16 |
Decimal integer in range of 0 to 65535.Interpreted as: 16384 × (Ta / Value).*) |
“T2” |
2 |
0:UInt16 |
Decimal integer in range of 0 to 65535.Interpreted as: Value × Ta. *) |
“T4” |
4 |
0:UInt32 |
Decimal integer in range of 0 to 4294967295.Interpreted as: Value × Ta. *) |
“D2” |
2 |
0:UInt16 |
Decimal integer in range of 0 to 65535.Interpreted as: Value × ( Ta / 16384). *) |
“E2” |
2 |
0:Int16 |
Fixed-point number. Range: -256+2-7 to 256-2-7Resolution: 2-7 (0.0078125). |
“C4” |
4 |
0:Int32 |
Fixed-point number. Range: -214748.3648 to 214748.3647.Resolution: 0.0001. |
“X2” |
2 |
0:Int16 |
Decimal integer in range of -32768 to 32767.Interpreted as: Value / 2X. |
“X4” |
4 |
0:Int32 |
Decimal integer in range of -2147483648 to 2147483647.Interpreted as: Value / 2X. |
“Unipolar2.16” |
2 |
0:UInt32 |
Fixed-point number which expresses a value in percent. Range: 0% to (400-2-14) %. Resolution: 2-14 (0.0061) %. |
*): Constant sampling time Ta.
Table 59 shows references of standard data types and profile specific data types used by PROFIdrive (see [PDP], 5.2 and 5.3). The numeric identifier is the value of the first byte of the BMP parameter description “Identifier (ID)”.
If a conversion factor and an offset are to be applied for the display value (see [PDP], 6.2.1.3, Standardisation factor and Variable attribute), the OPC UA DataType shall always be 0:Float or 0:Double.
Table 59 – BMP data type to OPC UA data type mapping
BMP data type |
Data type numeric identifier |
OPC UA DataType |
Reference to definition. |
Boolean |
1 |
0:Boolean |
Boolean (see PN PROTOCOL) |
Integer8 |
2 |
0:SByte |
Integer8 (see PN PROTOCOL) |
Integer16 |
3 |
0:Int16 |
Integer16 (see PN PROTOCOL) |
Integer32 |
4 |
0:Int32 |
Integer32 (see PN PROTOCOL) |
Integer64 |
55 |
0:Int64 |
Integer64 (see PN PROTOCOL) |
Unsigned8 |
5 |
0:Byte |
Unsigned8 (see PN PROTOCOL) |
Unsigned16 |
6 |
0:UInt16 |
Unsigned16 (see PN PROTOCOL) |
Unsigned32 |
7 |
0:UInt32 |
Unsigned32 (see PN PROTOCOL) |
Unsigned64 |
56 |
0:UInt64 |
Unsigned64 (see PN PROTOCOL) |
FloatingPoint |
8 |
0:Float |
Float32 (see PN PROTOCOL) |
FloatingPoint64 |
15 |
0:Double |
Float64 (see PN PROTOCOL) |
VisibleString |
9 |
0:String |
VisibleString (see PN PROTOCOL) |
OctetString |
10 |
0:ByteString |
OctetString (see PN PROTOCOL) |
UNICODEString |
39 |
0:NormalizedString |
UNICODEString (see PN PROTOCOL) |
TimeOfDay (with date indication) |
12 |
GsdGenIoTimeDataType |
TimeOfDay with date indication (see PN PROTOCOL) |
TimeDifference (do not use) |
13 |
- |
TimeDifference (see PN PROTOCOL) |
Date |
50 |
0:DateTime |
Binary Date (see PN PROTOCOL) |
TimeOfDay without date indication |
52 |
0:UInt32 |
TimeOfDay without date indication (see PN PROTOCOL) |
TimeDifference with date indication |
53 |
GsdGenIoTimeDataType |
TimeDifference with date indication (see PN PROTOCOL) |
TimeDifference without date indication |
54 |
0:UInt32 |
Time Difference without date indication (see PN PROTOCOL) |
N2 Normalized value (16 bit) |
113 |
0:Int16 |
[PDP] sec. 5.3.2 Table 3 and Table 4 |
N4 Normalized value (32 bit) |
114 |
0:Int32 |
[PDP] sec. 5.3.2 Table 3 and Table 4 |
V2 Bit sequence |
115 |
0:Boolean[16] |
[PDP] sec. 5.3.6 and Table 10 |
L2 Nibble |
116 |
0:Boolean[16] |
[PDP] sec. 5.3.7 and Table 11 |
R2 Reciprocal time constant |
117 |
0:UInt16 |
[PDP] sec. 5.3.10 and Table 14 |
T2 Time constant (16 bit) |
118 |
0:UInt16 |
[PDP] sec. 5.3.8 and Table 12 |
T4 Time constant (32 bit) |
119 |
0:UInt32 |
[PDP] sec. 5.3.8 and Table 12 |
D2 Time constant |
120 |
0:UInt16 |
[PDP] sec. 5.3.9 and Table 13 |
E2 Fixed point value (16 bit) |
121 |
0:Int16 |
[PDP] sec. 5.3.4, Table 7 and Table 8 |
C4 Fixed point value (32 bit) |
122 |
0:Int32 |
[PDP] sec. 5.3.5 and Table 9 |
X2 Normalized value, variable (16 bit) |
123 |
0:Int16 |
[PDP] sec. 5.3.3, Table 5 and Table 6 |
X4 Normalized value, variable (32 bit) |
124 |
0:Int32 |
[PDP] sec. 5.3.3, Table 5 and Table 6 |