PLCcheck

IEC 61131-3 Data Types for PLC Programmers

Reference table of all IEC 61131-3 data types: BOOL, BYTE, WORD, DWORD, INT, DINT, REAL, LREAL, TIME, STRING, ARRAY, STRUCT, UDT. With bit widths, ranges, and Siemens S7 availability.

·8 min read
IEC 61131-3data typesBOOLINTDINTREALSTRINGARRAYSTRUCTS7PLC

IEC 61131-3 Data Types for PLC Programmers

IEC 61131-3 defines a set of elementary and complex data types used across all five programming languages. This reference covers each type with its size, range, and availability on Siemens S7 platforms.

Elementary Data Types

Bit Types

TypeSizeRangeDescriptionS7-300/400S7-1200/1500
BOOL1 bitTRUE / FALSESingle binary value
BYTE8 bitsB#16#00 to B#16#FF8-bit unsigned
WORD16 bitsW#16#0000 to W#16#FFFF16-bit bit string
DWORD32 bitsDW#16#0000_0000 to DW#16#FFFF_FFFF32-bit bit string
LWORD64 bitsLW#16#0 to LW#16#FFFF_FFFF_FFFF_FFFF64-bit bit string

Integer Types

TypeSizeRangeDescriptionS7-300/400S7-1200/1500
SINT8 bits-128 to +127Short integer
INT16 bits-32768 to +32767Integer
DINT32 bits-2147483648 to +2147483647Double integer
LINT64 bits-2^63 to +2^63-1Long integer
USINT8 bits0 to 255Unsigned short
UINT16 bits0 to 65535Unsigned integer
UDINT32 bits0 to 4294967295Unsigned double
ULINT64 bits0 to 2^64-1Unsigned long

Floating-Point Types

TypeSizeRangePrecisionS7-300/400S7-1200/1500
REAL32 bits±3.4×10^38~7 digits
LREAL64 bits±1.8×10^308~15 digits

Time and Date Types

TypeSizeFormatDescriptionS7-300/400S7-1200/1500
TIME32 bitsT#5m30sDuration (ms resolution)
LTIME64 bitsLT#5m30s15nsDuration (ns resolution)
DATE16 bitsD#2026-03-22Calendar date
TIME_OF_DAY (TOD)32 bitsTOD#14:30:00Time of day (ms)
DATE_AND_TIME (DT)64 bitsDT#2026-03-22-14:30:00Combined date+time
DTL12 bytesDate+time+nanoseconds
S5TIME16 bitsS5T#2sLegacy Siemens timer format (BCD)✅ (compat.)

Character Types

TypeSizeDescriptionS7-300/400S7-1200/1500
CHAR1 byteSingle ASCII character
WCHAR2 bytesUnicode character
STRINGn+2 bytesVariable-length string (max 254 chars)
WSTRING2n+4 bytesUnicode string

STRING stores the maximum length in byte 0 and the actual length in byte 1. The string data starts at byte 2. STRING[10] occupies 12 bytes.

Complex Data Types

TypeDescriptionUse Case
ARRAYIndexed collection of identical type elementsARRAY[0..9] OF INT — 10 integers
STRUCTNamed collection of mixed type elementsRecipe parameters, sensor group
UDTUser-Defined Type — reusable STRUCTMotor interface, valve control template

Migration Note: S7-300/400 → S7-1500

Types marked ❌ for S7-300/400 are only available on S7-1200/1500. When migrating, you gain access to SINT, USINT, UINT, UDINT, LREAL, LINT, ULINT, LWORD, WCHAR, WSTRING, DTL, and LTIME. These enable more efficient programming but require code changes to use.


Analyze Your Code's Data Type Usage

PLCcheck Pro identifies data type mismatches, implicit conversions, and opportunities to use more efficient types after migration.

Upload code for data type analysis →

Part of the IEC 61131-3 Reference. Maintained by PLCcheck.ai. Not affiliated with Siemens AG or IEC.

Related Articles

Analyze your PLC code with AI

PLCcheck Pro explains, documents, optimizes, and migrates PLC code — automatically.

Try PLCcheck Pro →
← Back to Blog

Not affiliated with Siemens AG. S5, S7, STEP 5, STEP 7, and TIA Portal are trademarks of Siemens AG.