IEC标准数据类型映射

<< 点击显示目录 >>

主页  OPC UA使用助手 > OPC UA 帮助 > 信息模型 > 数据类型分配 >

IEC标准数据类型映射

由于不是所有的IEC标准数据类型都可以用OPC UA,这些数据类型必须被映射。对于一些数据类型,如字符串和DateTime,需要从目标系统上的格式转换到OPC UA服务器上的格式。

下表列出了所有的映射以及关于编码的信息:

IEC data type

UA data type

Comment

BOOL

Boolean

 

 

 

 

SINT

SByte

 

INT

Int16

 

DINT

Int32

 

LINT

Int64

No process variables of this type are currently possible.

USINT

Byte

 

UINT

UInt16

 

UDINT

UInt32


ULINT

UInt64

No process variables of this type are currently possible.

 

 

 

REAL

Float

 

LREAL

Double

 

 

 

 

BYTE

Byte

1-byte bit mask

WORD

UInt16

2-byte bit mask

DWORD

UInt32

4-byte bit mask

LWORD

UInt64

No process variables of this type are currently possible.

 

 

 

STRING

String

ASCII or ISO 8859 on the server is converted from/to UTF-8.

WSTRING

String

Wide character Unicode on the server is converted from/to UTF-8.

 

 

 

DATE_AND_TIME

DateTime

4-byte date and time from 1970-01-01-00:00:00 to 2106-02-07-06:28:15 from/to 8-byte OPC UA date and time

TIME

UInt32

4-bytetime from -24d:20h:31m:23s:648ms to 24d:20h:31m:23s:647ms

DATE

DateTime

4-byte date from 1970-01-01 to 2106-02-07 from/to 8-byte OPC UA date and time

TIME_OF_DAY

UInt32

4-bytetime from 00:00:00 to 23:59:59.999

 

 

 

OCTET

ByteString

No process variables of this type are currently possible.