Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

Data Types

IEC 61131-3 defines a set of elementary data types and mechanisms for creating derived types.

Tip

Examples on supported data type pages are interactive — edit the code and see results in your browser. Powered by the IronPLC Playground.

Elementary Types

Type

Size

Description

BOOL

1 bit

Boolean

SINT

8 bits

Signed short integer

INT

16 bits

Signed integer

DINT

32 bits

Signed double integer

LINT

64 bits

Signed long integer

USINT

8 bits

Unsigned short integer

UINT

16 bits

Unsigned integer

UDINT

32 bits

Unsigned double integer

ULINT

64 bits

Unsigned long integer

REAL

32 bits

Single-precision floating point

LREAL

64 bits

Double-precision floating point

BYTE

8 bits

Bit string of 8 bits

WORD

16 bits

Bit string of 16 bits

DWORD

32 bits

Bit string of 32 bits

LWORD

64 bits

Bit string of 64 bits

STRING

Variable

Single-byte character string

WSTRING

Variable

Double-byte character string

TIME

32 bits

Duration

LTIME

64 bits

Duration (Edition 3)

DATE

32 bits

Calendar date

LDATE

64 bits

Calendar date (Edition 3)

TIME_OF_DAY

32 bits

Time of day

LTIME_OF_DAY

64 bits

Time of day (Edition 3)

DATE_AND_TIME

64 bits

Date and time of day

LDATE_AND_TIME

64 bits

Date and time of day (Edition 3)

Derived Types

Type

Description

Enumerated types

Named set of values

Subrange types

Integer type restricted to a range

Array types

Fixed-size indexed collection

Structure types

Record with named fields

Reference types

Pointer to a variable (Edition 3)