In PLC programming, understanding Data Types in PLC is essential for writing efficient, reliable, and easy-to-maintain control logic. Data types define how information is stored in memory, how much space it occupies, and what kind of operations can be performed on it. From simple ON/OFF signals to complex numerical values and text messages, PLCs rely on different data types to handle industrial processes accurately.
This article explains the most commonly used Data Types in PLC with clear examples, simple language, and practical applications—making it easy to understand for beginners as well as working engineers.
Data Types in PLC
Without a clear understanding of data types and their formats, a PLC programmer cannot design, structure, or execute a control program effectively. PLC data types can be broadly classified into:
- Boolean and binary data types
- Numeric data types
- Character and string data types
- Advanced and derived data types
Let’s explore them one by one.
Bit
A bit is the smallest and most basic data unit in a PLC. Every PLC variable is ultimately built from individual bits, and a bit can store only two possible values: 0 or 1.
To visualize this, consider Indian currency. A paisa is the smallest unit, and multiple paisas together form a rupee. In the same way, all PLC data types begin with a single bit and are formed by combining many bits.
Because a bit represents only TRUE or FALSE (or ON/OFF), it is also known as a Boolean data type.
Key Points:
- Stores only two values: 0 (OFF) or 1 (ON)
- Widely used for digital logic
- Commonly appears as contacts and coils in ladder logic
Typical Applications:
- Push buttons
- Limit switches
- Relay and contact status
- Motor start/stop commands
Example:
Motor_Run = 1→ Motor is ONMotor_Run = 0→ Motor is OFF
This simple data type forms the foundation of all PLC programs and control logic.
Byte
A byte is created by grouping 8 bits together. Within a byte, the rightmost bit is called the LSB (Least Significant Bit), and the leftmost bit is known as the MSB (Most Significant Bit). Each bit has its own weight, and the total number of values a byte can represent is determined by the formula 2ⁿ, where n is the number of bits.
Since a byte contains 8 bits, it can represent 2⁸ = 256 different combinations.

Bytes can be classified into:
- Unsigned bytes, which store values from 0 to 255
- Signed bytes, which store values from –128 to +127
Key Points:
- Consists of 8 bits
- Each bit can be accessed and used independently
- Efficient for handling grouped digital signals
Typical Applications:
- Status and fault flags
- Communication and protocol data
- Input/output modules with multiple digital channels
Example:
A single byte can be used to represent the status of 8 digital sensors stored in one PLC memory location.
In many PLC platforms, a byte is also referred to as a short integer, making it a compact and efficient data type for digital information handling.
Integer (INT)
An integer (INT) is a whole-number data type created by combining 16 bits, or two bytes. In this format, the lower byte is referred to as the LSB (Least Significant Byte), while the higher byte is the MSB (Most Significant Byte).
With 16 bits, an integer can represent 2¹⁶ = 65,536 possible values. When used as a signed data type, an integer stores only whole numbers and does not support decimal values.
Key Points:
- Usually occupies 16 bits
- Signed value range: –32,768 to +32,767
- Decimal values are not allowed
In PLC terminology, an integer is often called a word. A word itself is typically unsigned, but when interpreted as an INT, it can represent signed values.
Typical Applications:
- Counting objects on a conveyor
- Timer and counter preset or accumulated values
- Speed and position calculations where decimals are not required
Example:Counter_Value = 125
Integers are one of the most commonly used data types in PLC programming due to their balance between range, memory usage, and processing speed.
Double Integer (DINT)
A double integer (DINT) is an extended version of a standard integer, designed to handle much larger numeric values. It is formed using 32 bits, allowing it to represent 2³² = 4,294,967,296 possible combinations.
When used as a signed data type, a double integer has a value range of –2,147,483,648 to +2,147,483,647, making it ideal for applications where the range of a normal INT is not sufficient.
Key Points:
- Occupies 32 bits
- Handles significantly larger values than INT
- Used when standard integer limits are exceeded
In PLC memory structure, a double integer uses two consecutive words. For example, in a Schneider PLC:
- %MW0 and %MW1 together form one double integer
- Using
%MD0occupies both word locations - The next available double integer address becomes
%MD2
Typical Applications:
- Large production and batch counters
- Energy and flow totalizers
- High-resolution and long-term measurements
Example:
Tracking the total production count accumulated over extended operating periods.
Real
A Real data type is used to store floating-point (decimal) values and is typically implemented as a 32-bit IEEE floating-point format. Although it occupies the same 32 bits as a double integer, the key difference is that a Real variable can directly handle fractions and decimal numbers, providing much higher precision than integer-based data types.
The approximate value range of a Real data type is –3.4028235 × 10³⁸ to +3.4028235 × 10³⁸, making it suitable for a wide range of engineering calculations.
Like a double integer, a Real value occupies two consecutive memory words in PLC memory.
Key Points:
- Uses 32-bit floating-point representation
- Supports decimal and fractional values
- Offers higher precision compared to integers
Typical Applications:
- Temperature measurement
- Pressure monitoring
- Flow rate calculation
- Analog signal scaling
Example:Temperature = 36.75
Real data types are essential in PLC programs where accurate analog values and mathematical calculations are required.
String
A string is a data type used to store a sequence of characters, including letters, numbers, and special symbols. Each PLC manufacturer defines its own method and reserved memory area for managing string variables, so the maximum length and structure can vary by PLC brand and configuration.
The memory requirement for a string is generally:
- 1 byte per character
- 1 additional byte for length or termination
Key Points:
- Stores text-based data such as letters, numbers, and symbols
- String length depends on the PLC platform and setup
- Primarily used for text handling and display purposes
Typical Applications:
- HMI messages and labels
- Alarm and fault descriptions
- Recipe and batch names
- Operator prompts and instructions
Example:Alarm_Text = "High Temperature"
Strings play an important role in operator communication and system diagnostics, making PLC programs more user-friendly and easier to monitor.
Why Data Types in PLC Matter
Choosing the correct Data Types in PLC is critical because:
- It optimizes memory usage
- Improves program execution speed
- Prevents overflow and calculation errors
- Enhances readability and troubleshooting
Incorrect data type selection can lead to inaccurate results, unexpected behavior, or system faults.
Comparison Table of Common PLC Data Types
| Data Type | Size | Value Type | Typical Use |
| Bit / BOOL | 1 bit | ON / OFF | Digital signals |
| Byte | 8 bits | 0–255 | Grouped digital data |
| Integer (INT) | 16 bits | Whole numbers | Counters |
| Double Integer (DINT) | 32 bits | Large whole numbers | High-range counts |
| Real | 32 bits | Decimal numbers | Analog values |
| String | Variable | Text | Messages & alarms |
Conclusion
Understanding Data Types in PLC is a foundational skill for anyone working in industrial automation. From simple Bit operations to complex Real number calculations and String-based messages, each data type serves a specific purpose. Using the right data type not only improves performance but also makes PLC programs easier to read, debug, and maintain.
By mastering Data Types in PLC, you can build more reliable control systems and write professional-grade automation logic that performs efficiently in real-world industrial environments.
Read Next: