PLC Inputs and Outputs – DI, DO, AI, AO Complete Guide (2026)

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:

StepActionExample
1. Field device generates signalSensor detects a conditionPhotoelectric sensor detects a bottle
2. Input module reads signalPLC receives the inputDI bit at I0.0 goes TRUE
3. CPU executes programLadder logic processes the inputRung evaluates: IF sensor ON THEN counter +1
4. Output module activatesPLC sends control commandDO at Q0.0 energizes motor contactor
5. Field device respondsPhysical equipment reactsConveyor motor starts running

There are 4 types of PLC I/O, split into two categories — Digital (ON/OFF) and Analog (variable):

IO TypeAbbreviationDirectionSignal TypeExample
Digital InputDIField → PLCON / OFF (0 or 1)Push button, limit switch
Digital OutputDOPLC → FieldON / OFF (0 or 1)Motor contactor, solenoid valve
Analog InputAIField → PLCVariable (4-20mA, 0-10V)Temperature transmitter, flow meter
Analog OutputAOPLC → FieldVariable (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

StandardVoltageTypical Application
24VDC Sink/Source24V DCMost common — modern PLC panels, proximity sensors
120VAC110-120V ACLegacy industrial panels, older push buttons
240VAC200-240V ACHeavy industrial environments
48VDC48V DCTelecom facilities, safety systems
5VDC / TTL5V DCElectronic 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

DeviceHow It WorksTypical Application
Push Button (NO)Closes contact when pressedMachine start, operator commands
Push Button (NC)Opens contact when pressedEmergency stop, machine stop
Limit SwitchActuates when physical position reachedEnd of travel detection, door position
Proximity Sensor (Inductive)Detects metal objects without contactMetal part detection, gear tooth counting
Proximity Sensor (Capacitive)Detects any material without contactLiquid level, plastic part detection
Photoelectric SensorLight beam interrupted or reflectedProduct counting, conveyor sensing
Float SwitchFloat actuates when liquid reaches levelTank high/low level alarm
Pressure SwitchContact closes at set pressureLow pressure alarm, pump protection
Motor Run FeedbackAuxiliary contact on contactorConfirm motor is running
Emergency StopNC mushroom head buttonSafety shutdown — always NC wired

Siemens TIA Portal — DI Addressing

In Siemens TIA Portal, digital inputs are addressed with the % prefix:

AddressMeaningExample
%I0.0Input byte 0, bit 0First channel of first DI module
%I0.1Input byte 0, bit 1Second channel of first DI module
%I1.0Input byte 1, bit 0First channel of second DI module
%IB0Input 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 FormatExampleMeaning
Local:Slot:I.Data.BitLocal:1:I.Data.0Slot 1 DI module, channel 0
Tag name (recommended)Start_PBUser-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 TypeHow It SwitchesProsConsBest For
Relay OutputMechanical contact closesHandles AC and DC, isolated, high voltageSlower (~10ms), limited lifetime (~1M ops)Motor starters, general loads
Transistor (NPN/PNP)Semiconductor switchingFast (<1ms), long life, no moving partsDC only, requires correct polarityHigh-speed sensing, solenoids
Triac OutputThyristor AC switchingGood for AC loads, no moving partsAC only, small voltage dropAC solenoids, heating elements

Common Digital Output Devices

DeviceHow DO Controls ItTypical Application
Motor ContactorDO energizes contactor coil → contacts close → motor startsConveyor motors, pumps, fans
Solenoid ValveDO energizes solenoid coil → valve opens or closesPneumatic cylinders, fluid control
Indicator LampDO switches lamp ON/OFFStatus lights on control panel
Stack LightDO energizes red/yellow/green light segmentsMachine status indication
Alarm Horn/BuzzerDO energizes horn coilFault alarms, shift change signals
Relay CoilDO energizes relay → relay contacts control other circuitsSignal isolation, voltage conversion
Electromagnetic BrakeDO de-energizes brake coil → brake engagesConveyor stop, hoist safety
Heating Element (simple)DO switches heater ON/OFFSimple 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 TypeRangeTypical Use
4-20mA Current4mA = 0%, 20mA = 100%Most common — process transmitters worldwide
0-20mA Current0mA = 0%, 20mA = 100%Older standard — cannot detect wire break
0-10V Voltage0V = 0%, 10V = 100%Building automation, short cable runs
0-5V Voltage0V = 0%, 5V = 100%Electronic instruments, HVAC sensors
1-5V Voltage1V = 0%, 5V = 100%Ratiometric sensors, safe for wire break
±10V Voltage-10V = min, +10V = maxServo drives, bilateral measurements
Thermocouple (mV)Type J, K, T, E, R, S, BHigh-temperature measurement
RTD (Resistance)PT100, PT1000, Ni120Precision temperature measurement

Why 4-20mA Is the Industry Standard

4-20mA signal explained wire break detection noise immunity 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:

AdvantageExplanation
Wire break detection4mA 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 immunityCurrent 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 poweredA 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 transmissionConstant current is maintained regardless of cable resistance (within limits), allowing transmission over 1,000 meters without signal degradation.
HART compatibleThe 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:

SignalRaw ValueEngineering UnitExample
4mA (minimum)0 (Siemens: 5,530)0% of range0°C / 0 bar / 0 m³/h
12mA (midpoint)50% of raw max50% of range50°C / 5 bar / 50 m³/h
20mA (maximum)27,648 (Siemens)100% of range100°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 TypeMeasuresOutput SignalIndustries
Temperature TransmitterTemperature (°C/°F)4-20mAAll process industries
Pressure TransmitterGauge/differential/absolute pressure4-20mAOil & gas, water, HVAC
Flow TransmitterFlow rate (m³/h, L/min)4-20mAWater, chemical, food
Level TransmitterLiquid level (m, %)4-20mATanks, silos, vessels
pH AnalyzerpH value (0-14)4-20mAWater treatment, chemical
Load CellWeight (kg, tonnes)mV/V → 4-20mABatching, weighing
Humidity SensorRelative humidity (%RH)0-10V or 4-20mAHVAC, pharmaceutical
ThermocoupleHigh 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

DeviceSignalHow AO Controls ItApplication
Control Valve (Pneumatic)4-20mA → I/P positioner4mA = fully closed, 20mA = fully openFlow control, pressure regulation
Variable Frequency Drive (VFD)4-20mA or 0-10V4mA = 0 Hz, 20mA = 50/60 Hz (max speed)Motor speed control
Dosing Pump4-20mAControls pump stroke rate or speedChemical dosing, water treatment
Proportional Valve4-20mAControls valve opening proportionallyHydraulics, pneumatics
Heater Power Controller4-20mAControls heater output from 0-100%Temperature control
Damper Actuator0-10V or 4-20mAControls air damper position 0-100%HVAC airflow control

Digital vs Analog Signals — Key Differences

FeatureDigital SignalAnalog Signal
StatesOnly 2: ON (1) or OFF (0)Infinite values within a range
Signal type24VDC present or not present4-20mA or 0-10V variable
InformationIs it happening? Yes/NoHow much? What value?
PLC data typeBOOL (bit)INT or REAL (word/float)
Module costLowerHigher
Wiring complexitySimpleMore complex (shielded cable)
Used forSwitches, buttons, motor statusTemperature, pressure, flow, speed
Control typeOn/off controlProportional/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 TypeEngineering EffortWhy
Digital Input (DI)1× baselineSimple — read bit, use in logic
Digital Output (DO)1× baselineSimple — write bit, activate device
Analog Input (AI)2-4× DIRequires scaling, filtering, alarm limits
Analog Output (AO)2× DORequires 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:

Scroll to Top