PLC & Data
PLC Data Type Ranges
Bit width and value range for the IEC 61131-3 elementary data types, with the practical notes that matter in controller programming.
Source of these values
IEC 61131-3 elementary data types. Vendor implementations vary in which types they support and what they call them.
| Type | Bits | Minimum | Maximum | Notes |
|---|---|---|---|---|
| BOOL | 1 | 0 | 1 | A single bit. Stored in a byte or packed into a word depending on platform. |
| BYTE / USINT | 8 | 0 | 255 | Unsigned 8-bit. |
| SINT | 8 | -128 | 127 | Signed 8-bit. |
| WORD / UINT | 16 | 0 | 65,535 | Unsigned 16-bit. One Modbus register. |
| INT | 16 | -32,768 | 32,767 | Signed 16-bit. The most common PLC integer, and the one analog values usually land in. |
| DWORD / UDINT | 32 | 0 | 4,294,967,295 | Unsigned 32-bit. Two Modbus registers. |
| DINT | 32 | -2,147,483,648 | 2,147,483,647 | Signed 32-bit. Used for totalizers and run-hour counters. |
| LWORD / ULINT | 64 | 0 | 18,446,744,073,709,551,615 | Unsigned 64-bit. |
| LINT | 64 | -9,223,372,036,854,775,808 | 9,223,372,036,854,775,807 | Signed 64-bit. |
| REAL | 32 | ±1.18e-38 | ±3.40e38 | IEEE 754 single precision. About 7 significant decimal digits, which is why a large totalizer loses resolution in a REAL. |
| LREAL | 64 | ±2.23e-308 | ±1.80e308 | IEEE 754 double precision. About 15 significant decimal digits. |
In short
The IEC 61131-3 integer types are bounded by bit width. An INT is 16-bit signed and holds -32,768 to 32,767. A DINT is 32-bit signed and holds about plus or minus 2.1 billion. A REAL is IEEE 754 single precision with roughly 7 significant decimal digits.
Notes and limits
- Integer overflow in a PLC usually wraps silently rather than raising an error, which is why a run-hour counter in an INT rolls over at 32,767 and starts from a large negative number.
- A REAL carries about 7 significant decimal digits. A totalizer above roughly 16.7 million stops resolving single units and appears to stall.
- A Modbus register is 16 bits. Anything larger spans two registers, and the standard does not define which comes first.
Direct contact
Have a controls question?
Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.