Glossary · Automation fundamentals, platforms and components
Uint
Also known as: Unsigned integer
German: UINT
In IEC 61131-3, UINT is the elementary data type for a 16-bit unsigned integer, with a value range from 0 to 65535. Related unsigned types are USINT (8 bit), UDINT (32 bit) and ULINT (64 bit).
- Automation components
In one sentence
UINT is the IEC 61131-3 data type for a 16-bit unsigned integer, range 0 to 65535; related types are USINT, UDINT and ULINT.
Example
A piece counter declared as UINT rolls over from 65535 to 0 after a long production run, so it is changed to UDINT.
How it applies
- Engineering: UINT matches one 16-bit Modbus Register and is common for counters, status words and raw analog values. Overflow and conversion between signed and unsigned types are frequent sources of errors.
- Integration: When data is exchanged, both sides must interpret the 16 bits the same way; a UINT read as INT shows large values as negative numbers.
- Documentation: Interface descriptions and register maps give the data type for every value. Write the type as "UINT (16-bit unsigned)" at least once, because readers from other programming languages may not know the IEC 61131-3 names.
UINT vs. INT
INT is signed, from −32768 to 32767. UINT has the same size but no sign, from 0 to 65535.