Data Types

The user can use standard data types and self-defined data types when programming. Each identifier is assigned a data type that determines how much memory is reserved and which values correspond to the memory contents.

Notice

Loss of data

The different data types cover different number ranges. It may happen that information is lost during type conversion from larger to smaller types.

Requirements

Standard data type

User-defined data type

BOOL

ARRAY (fields, arrays)

BYTE

POINTER

WORD

ENUM (enumeration type)

DWORD

STRUCT (structures)

SINT

ALIAS (references)

USINT

Subrange types

INT

 

UINT

 

DINT

 

UDINT

 

LINT (64-bit integer, currently not supported by TwinCAT)

 

ULINT (Unsigned 64-bit integer, currently not supported by TwinCAT)

 

REAL

 

LREAL

 

STRING

 

TIME

 

TIME_OF_DAY (TOD)

 

DATE

 

DATE_AND_TIME (DT)