Last Updated: April 2026 | Written for automation engineers and beginners learning industrial control systems.
PLC inputs and outputs are the connection between the PLC and the real world. Every sensor reading, every motor start, every valve movement — all of it passes through the PLC’s input and output modules. Understanding DI, DO, AI, and AO is the foundation of all PLC programming and automation engineering.
This complete PLC inputs and outputs guide covers everything you need to know:
- Clear explanation of all 4 PLC IO types — DI, DO, AI, AO
- Full list of field devices connected to each IO type with real examples
- Why 4-20mA is the industry standard analog signal — explained with diagram
- Digital output types — relay, transistor, triac — when to use each
- How IO is addressed in Siemens TIA Portal and Allen-Bradley Studio 5000
- How to calculate IO requirements for a project
- The most common IO wiring mistakes and how to avoid them
What Are PLC Inputs and Outputs? – DI, DO, AI, AO Explained
PLC inputs and outputs — collectively called PLC I/O — are the hardware interfaces that connect the PLC to the physical industrial process. They are the nervous system of automation: inputs carry information from the real world into the PLC, and outputs carry control commands from the PLC back to the real world.
Every automation system follows the same fundamental loop:
| Step | Action | Example |
|---|---|---|
| 1. Field device generates signal | Sensor detects a condition | Photoelectric sensor detects a bottle |
| 2. Input module reads signal | PLC receives the input | DI bit at I0.0 goes TRUE |
| 3. CPU executes program | Ladder logic processes the input | Rung evaluates: IF sensor ON THEN counter +1 |
| 4. Output module activates | PLC sends control command | DO at Q0.0 energizes motor contactor |
| 5. Field device responds | Physical equipment reacts | Conveyor motor starts running |
There are 4 types of PLC I/O, split into two categories — Digital (ON/OFF) and Analog (variable):
| IO Type | Abbreviation | Direction | Signal Type | Example |
|---|---|---|---|---|
| Digital Input | DI | Field → PLC | ON / OFF (0 or 1) | Push button, limit switch |
| Digital Output | DO | PLC → Field | ON / OFF (0 or 1) | Motor contactor, solenoid valve |
| Analog Input | AI | Field → PLC | Variable (4-20mA, 0-10V) | Temperature transmitter, flow meter |
| Analog Output | AO | PLC → Field | Variable (4-20mA, 0-10V) | Control valve, VFD speed reference |
PLC Inputs and Outputs – Digital Input (DI) Explained
A Digital Input (DI) — also called a Discrete Input — is a signal that has only two possible states: ON (1) or OFF (0). When a field device closes its contact or provides a voltage, the DI module detects this and sets the corresponding input bit in the PLC memory to TRUE.
How Digital Inputs Work
When a push button is pressed, 24VDC flows through the DI module terminal. The module’s internal circuitry detects this voltage and changes the corresponding bit in the PLC input image table from 0 to 1. On the next scan cycle, the PLC program reads this bit and acts on it.
Digital Input Voltage Standards
| Standard | Voltage | Typical Application |
|---|---|---|
| 24VDC Sink/Source | 24V DC | Most common — modern PLC panels, proximity sensors |
| 120VAC | 110-120V AC | Legacy industrial panels, older push buttons |
| 240VAC | 200-240V AC | Heavy industrial environments |
| 48VDC | 48V DC | Telecom facilities, safety systems |
| 5VDC / TTL | 5V DC | Electronic circuits, encoder signals |
Full wiring standards for PLC IO are defined by the International Electrotechnical Commission (IEC) in IEC 61131-2.
Common Digital Input Devices
| Device | How It Works | Typical Application |
|---|---|---|
| Push Button (NO) | Closes contact when pressed | Machine start, operator commands |
| Push Button (NC) | Opens contact when pressed | Emergency stop, machine stop |
| Limit Switch | Actuates when physical position reached | End of travel detection, door position |
| Proximity Sensor (Inductive) | Detects metal objects without contact | Metal part detection, gear tooth counting |
| Proximity Sensor (Capacitive) | Detects any material without contact | Liquid level, plastic part detection |
| Photoelectric Sensor | Light beam interrupted or reflected | Product counting, conveyor sensing |
| Float Switch | Float actuates when liquid reaches level | Tank high/low level alarm |
| Pressure Switch | Contact closes at set pressure | Low pressure alarm, pump protection |
| Motor Run Feedback | Auxiliary contact on contactor | Confirm motor is running |
| Emergency Stop | NC mushroom head button | Safety shutdown — always NC wired |
Siemens TIA Portal — DI Addressing
In Siemens TIA Portal, digital inputs are addressed with the % prefix:
| Address | Meaning | Example |
|---|---|---|
| %I0.0 | Input byte 0, bit 0 | First channel of first DI module |
| %I0.1 | Input byte 0, bit 1 | Second channel of first DI module |
| %I1.0 | Input byte 1, bit 0 | First channel of second DI module |
| %IB0 | Input byte 0 (all 8 bits) | Read all 8 channels as one byte |
Allen-Bradley Studio 5000 — DI Addressing
In Studio 5000, digital inputs use tag-based addressing:
| Tag Format | Example | Meaning |
|---|---|---|
| Local:Slot:I.Data.Bit | Local:1:I.Data.0 | Slot 1 DI module, channel 0 |
| Tag name (recommended) | Start_PB | User-defined tag mapped to physical input |
PLC Inputs and Outputs – Digital Output (DO) Explained
A Digital Output (DO) is a signal sent FROM the PLC TO a field device to command a two-state action. The PLC sets the output bit in its memory, the output module detects this, and switches its output terminal ON or OFF — energizing or de-energizing the connected field device.
Digital Output Hardware Types
| Output Type | How It Switches | Pros | Cons | Best For |
|---|---|---|---|---|
| Relay Output | Mechanical contact closes | Handles AC and DC, isolated, high voltage | Slower (~10ms), limited lifetime (~1M ops) | Motor starters, general loads |
| Transistor (NPN/PNP) | Semiconductor switching | Fast (<1ms), long life, no moving parts | DC only, requires correct polarity | High-speed sensing, solenoids |
| Triac Output | Thyristor AC switching | Good for AC loads, no moving parts | AC only, small voltage drop | AC solenoids, heating elements |
Common Digital Output Devices
| Device | How DO Controls It | Typical Application |
|---|---|---|
| Motor Contactor | DO energizes contactor coil → contacts close → motor starts | Conveyor motors, pumps, fans |
| Solenoid Valve | DO energizes solenoid coil → valve opens or closes | Pneumatic cylinders, fluid control |
| Indicator Lamp | DO switches lamp ON/OFF | Status lights on control panel |
| Stack Light | DO energizes red/yellow/green light segments | Machine status indication |
| Alarm Horn/Buzzer | DO energizes horn coil | Fault alarms, shift change signals |
| Relay Coil | DO energizes relay → relay contacts control other circuits | Signal isolation, voltage conversion |
| Electromagnetic Brake | DO de-energizes brake coil → brake engages | Conveyor stop, hoist safety |
| Heating Element (simple) | DO switches heater ON/OFF | Simple on/off temperature control |
PLC Inputs and Outputs – Analog Input (AI) Explained
An Analog Input (AI) module converts a continuously varying electrical signal — representing a real-world measurement like temperature, pressure, flow, or level — into a digital number that the PLC can process. Unlike digital inputs that are simply ON or OFF, analog inputs give the PLC a precise numerical value representing the current state of a process variable.
Standard Analog Input Signal Ranges
| Signal Type | Range | Typical Use |
|---|---|---|
| 4-20mA Current | 4mA = 0%, 20mA = 100% | Most common — process transmitters worldwide |
| 0-20mA Current | 0mA = 0%, 20mA = 100% | Older standard — cannot detect wire break |
| 0-10V Voltage | 0V = 0%, 10V = 100% | Building automation, short cable runs |
| 0-5V Voltage | 0V = 0%, 5V = 100% | Electronic instruments, HVAC sensors |
| 1-5V Voltage | 1V = 0%, 5V = 100% | Ratiometric sensors, safe for wire break |
| ±10V Voltage | -10V = min, +10V = max | Servo drives, bilateral measurements |
| Thermocouple (mV) | Type J, K, T, E, R, S, B | High-temperature measurement |
| RTD (Resistance) | PT100, PT1000, Ni120 | Precision temperature measurement |
Why 4-20mA Is the Industry Standard

According to IEC standards for current loop signaling, the 4-20mA signal is the universal standard for process instrumentation worldwide. Here is why:
| Advantage | Explanation |
|---|---|
| Wire break detection | 4mA is the “live zero” — if the wire breaks, signal drops to 0mA which is physically impossible in a healthy loop. The PLC immediately detects a fault. A 0-10V signal cannot distinguish 0V (minimum value) from a broken wire. |
| Noise immunity | Current signals are far less susceptible to electrical noise than voltage signals — especially over long cable runs of hundreds of meters in electrically noisy industrial environments. |
| Two-wire powered | A 4-20mA transmitter can be powered by the loop itself (loop-powered or 2-wire transmitter), reducing wiring cost significantly — only 2 wires needed for both power and signal. |
| Long-distance transmission | Constant current is maintained regardless of cable resistance (within limits), allowing transmission over 1,000 meters without signal degradation. |
| HART compatible | The HART protocol superimposes digital communication on the 4-20mA signal, allowing device configuration and diagnostics without extra wiring. |
Analog Input Scaling — Converting mA to Engineering Units
The PLC converts the 4-20mA signal to a raw digital value (0–27,648 in Siemens, 0–32,767 in Allen-Bradley). This raw value must be scaled to engineering units using a linear calculation:
| Signal | Raw Value | Engineering Unit | Example |
|---|---|---|---|
| 4mA (minimum) | 0 (Siemens: 5,530) | 0% of range | 0°C / 0 bar / 0 m³/h |
| 12mA (midpoint) | 50% of raw max | 50% of range | 50°C / 5 bar / 50 m³/h |
| 20mA (maximum) | 27,648 (Siemens) | 100% of range | 100°C / 10 bar / 100 m³/h |
Siemens TIA Portal — Analog inputs are addressed as word values: %IW64, %IW66 etc. Use the NORM_X and SCALE_X instructions to convert raw values to engineering units.
Allen-Bradley Studio 5000 — Analog inputs appear as floating-point tags in the I/O tree. Studio 5000 can be configured to automatically scale to engineering units in the module properties.
Common Analog Input Sensors and Transmitters
| Sensor Type | Measures | Output Signal | Industries |
|---|---|---|---|
| Temperature Transmitter | Temperature (°C/°F) | 4-20mA | All process industries |
| Pressure Transmitter | Gauge/differential/absolute pressure | 4-20mA | Oil & gas, water, HVAC |
| Flow Transmitter | Flow rate (m³/h, L/min) | 4-20mA | Water, chemical, food |
| Level Transmitter | Liquid level (m, %) | 4-20mA | Tanks, silos, vessels |
| pH Analyzer | pH value (0-14) | 4-20mA | Water treatment, chemical |
| Load Cell | Weight (kg, tonnes) | mV/V → 4-20mA | Batching, weighing |
| Humidity Sensor | Relative humidity (%RH) | 0-10V or 4-20mA | HVAC, pharmaceutical |
| Thermocouple | High temperature (up to 1800°C) | mV (direct to TC module) | Furnaces, kilns |
PLC Inputs and Outputs – Analog Output (AO) Explained
An Analog Output (AO) is the reverse of an analog input — it converts a digital value from the PLC program into a continuously variable electrical signal sent to a field actuator. This allows the PLC to control a device to any position or speed within a range, not just ON or OFF.
Common Analog Output Devices
| Device | Signal | How AO Controls It | Application |
|---|---|---|---|
| Control Valve (Pneumatic) | 4-20mA → I/P positioner | 4mA = fully closed, 20mA = fully open | Flow control, pressure regulation |
| Variable Frequency Drive (VFD) | 4-20mA or 0-10V | 4mA = 0 Hz, 20mA = 50/60 Hz (max speed) | Motor speed control |
| Dosing Pump | 4-20mA | Controls pump stroke rate or speed | Chemical dosing, water treatment |
| Proportional Valve | 4-20mA | Controls valve opening proportionally | Hydraulics, pneumatics |
| Heater Power Controller | 4-20mA | Controls heater output from 0-100% | Temperature control |
| Damper Actuator | 0-10V or 4-20mA | Controls air damper position 0-100% | HVAC airflow control |
Digital vs Analog Signals — Key Differences
| Feature | Digital Signal | Analog Signal |
|---|---|---|
| States | Only 2: ON (1) or OFF (0) | Infinite values within a range |
| Signal type | 24VDC present or not present | 4-20mA or 0-10V variable |
| Information | Is it happening? Yes/No | How much? What value? |
| PLC data type | BOOL (bit) | INT or REAL (word/float) |
| Module cost | Lower | Higher |
| Wiring complexity | Simple | More complex (shielded cable) |
| Used for | Switches, buttons, motor status | Temperature, pressure, flow, speed |
| Control type | On/off control | Proportional/PID control |
How to Calculate PLC IO Requirements
Before selecting PLC hardware, understanding your PLC inputs and outputs count is essential. This is done using a PLC IO list — a document that records every signal in the system.
Use this standard IO weighting approach for project estimation:
| IO Type | Engineering Effort | Why |
|---|---|---|
| Digital Input (DI) | 1× baseline | Simple — read bit, use in logic |
| Digital Output (DO) | 1× baseline | Simple — write bit, activate device |
| Analog Input (AI) | 2-4× DI | Requires scaling, filtering, alarm limits |
| Analog Output (AO) | 2× DO | Requires scaling, PID tuning, ramp control |
Always add 15-20% spare IO capacity to your final count — projects always expand during commissioning. A system designed with no spare IO will require expensive module additions later.
For a full step-by-step IO calculation method with a free calculator tool: PLC IO Calculation – 5 Step-by-Step Methods + Free Calculator
Common PLC IO Wiring Mistakes
Mistake 1 – Connecting analog device to digital input
A 4-20mA transmitter connected to a 24VDC digital input will not work correctly — the DI module reads only voltage presence, not the current level. Always verify your signal type before wiring. Analog transmitters must connect to AI modules only.
Mistake 2 – Mixing sourcing and sinking wiring
PLC digital IO modules use either NPN (sinking) or PNP (sourcing) topology — and the field sensors must match. Connecting a PNP (sourcing) sensor to an NPN (sinking) input will not work. Always verify the sensor output type matches the PLC input module type.
Mistake 3 – No shielded cable for analog signals
Analog signals (4-20mA, 0-10V) are susceptible to electrical interference. Always use shielded twisted-pair cable for analog wiring and connect the shield to earth at one end only (typically the panel end). Unshielded cable in electrically noisy environments causes erratic readings.
Mistake 4 – Using NO contacts for emergency stops
Emergency stop buttons must always be wired as Normally Closed (NC) contacts. If the cable breaks, an NC contact opens — making the PLC detect a fault and stop the machine. A Normally Open (NO) emergency stop button will do nothing if the cable breaks — the machine keeps running with no way to stop it.
Mistake 5 – Exceeding output module current rating
Each digital output module has a maximum current rating per channel (typically 0.5A–2A) and a maximum total current for all channels combined. Connecting a high-current load like a large contactor coil directly to a transistor output module can exceed its rating and damage the module. Always use intermediate relays for high-current loads.
Mistake 6 – Wrong analog input type setting
Most PLC analog input modules support both current (4-20mA) and voltage (0-10V) inputs, switchable by jumper or software configuration. Connecting a 4-20mA transmitter to a module configured for 0-10V will give wrong readings. Always verify the module configuration matches the connected sensor.
Frequently Asked Questions – PLC Inputs and Outputs
What is the difference between DI, DO, AI, and AO in PLC?
DI (Digital Input) is an ON/OFF signal received by the PLC from a field device like a sensor or switch. DO (Digital Output) is an ON/OFF signal sent by the PLC to control a field device like a motor or valve. AI (Analog Input) is a variable signal (typically 4-20mA) received by the PLC from a transmitter measuring temperature, pressure, or flow. AO (Analog Output) is a variable signal sent by the PLC to control a device like a control valve or variable frequency drive.
What is 4-20mA and why is it used?
4-20mA is the most widely used analog signal standard in industrial automation. It uses a current loop where 4mA represents the minimum value (0%) and 20mA represents the maximum value (100%). It is preferred because it can detect wire breaks (signal drops to 0mA — physically impossible in a healthy loop), is immune to electrical noise, works over long cable distances, and allows two-wire transmitters to be powered by the loop itself.
What is the difference between digital and analog signals in PLC?
Digital signals have only two states — ON (1) or OFF (0) — like a light switch. They are used for detecting discrete conditions such as whether a button is pressed or a door is open. Analog signals are continuously variable over a range of values — like a dimmer switch. They are used for measuring process variables such as temperature, pressure, flow, and level where a precise numerical value is needed, not just yes or no.
What are the types of digital outputs in PLC?
PLC digital output modules use three main switching technologies. Relay outputs use mechanical contacts to switch loads — they handle both AC and DC, support high voltages, and are isolated but have limited lifetime and slower switching speed. Transistor outputs use solid-state semiconductor switching — they are fast, long-lasting, but only work with DC loads. Triac outputs use thyristors for AC switching — they work well with AC loads and have no moving parts.
How are analog inputs addressed in Siemens TIA Portal?
In Siemens TIA Portal, analog inputs are addressed as word values using the %IW prefix — for example %IW64, %IW66, %IW68 for consecutive analog input channels. The raw value from a 4-20mA input ranges from 5,530 (at 4mA) to 27,648 (at 20mA). The NORM_X and SCALE_X function blocks are used to convert these raw values to engineering units such as degrees Celsius or bar.
How many spare IO points should I add to my PLC system?
Always add 15-20% spare IO capacity to your final IO count. Industrial projects consistently expand during detailed design, installation, and commissioning — instruments get added, control strategies change, and safety requirements evolve. A system designed with zero spare IO will require expensive additional modules or even a larger PLC chassis later. Spare IO is one of the most cost-effective investments in any automation project.
What is the difference between sourcing and sinking PLC inputs?
Sourcing (PNP) inputs receive current flowing from the field device into the PLC input terminal. Sinking (NPN) inputs allow current to flow from the PLC terminal into the field device. The field sensor must match the PLC module type — a PNP sensor connected to an NPN input module will not work. Most modern PLC modules are configurable for either sourcing or sinking, and many support both simultaneously.
What cable should I use for analog signals?
Always use shielded twisted-pair cable for analog signals (4-20mA or 0-10V). The twisted pair reduces electromagnetic interference pickup, and the shield provides additional protection against electrical noise. Connect the shield to earth ground at one end only — typically at the control panel end — to prevent ground loops. Never run analog cables alongside high-voltage power cables without separation or additional shielding.
Conclusion
Understanding PLC inputs and outputs is the foundation of every industrial automation system.. Understanding the difference between DI, DO, AI, and AO — and knowing when to use each — is essential knowledge for every automation engineer.
Key points to remember:
- DI — reads ON/OFF from field devices (sensors, switches, buttons)
- DO — controls ON/OFF field devices (motors, valves, lamps)
- AI — reads variable measurements (4-20mA from transmitters)
- AO — controls variable devices (control valves, VFD speed drives)
- 4-20mA — industry standard because it detects wire breaks and resists noise
- Always add 15-20% spare IO capacity to every project
Related Guides:
