Skip to content

PLC Programming Course – Chapter 06: Digital and Analog I/O in PLC

Published: November 26, 2026 By admin

Digital and Analog I/O in PLC – Complete Guide

Digital and Analog I/O are fundamental parts of every Programmable Logic Controller (PLC) system. A PLC receives information from field devices through input modules, processes the information according to its control program, and sends commands to output devices through output modules.

In industrial automation, PLC input and output signals are mainly classified into two categories: Digital I/O and Analog I/O. Understanding the difference between these signals is essential for PLC programming, electrical wiring, commissioning, maintenance and troubleshooting.

This chapter explains Digital Inputs, Digital Outputs, Analog Inputs, Analog Outputs, signal types, wiring concepts, practical applications and troubleshooting methods.

1. What is I/O in PLC?

I/O stands for Input/Output.

I/O is the communication interface between a PLC and the external field devices installed in an industrial process.

A PLC uses input signals to monitor machine or process conditions and output signals to control field devices.

Basic PLC I/O Operation

  1. Sensors and switches send signals to PLC input modules.
  2. The PLC CPU reads and processes the input information.
  3. The control program executes the required logic.
  4. The PLC sends commands through output modules.
  5. Actuators and other field devices perform the required operation.

Example:

In a motor control system:

  • Push Button – Digital Input
  • Overload Relay Contact – Digital Input
  • Contactor Coil – Digital Output
  • Motor – Controlled through the contactor

2. Classification of PLC I/O

PLC I/O system showing Digital Input, Digital Output, Analog Input and Analog Output modules connected to industrial sensors, transmitters, contactors, control valves and VFD.
Overall concept of Digital and Analog I/O in a PLC system.

PLC I/O is mainly divided into two categories:

A. Digital I/O

  • Digital Input
  • Digital Output

B. Analog I/O

  • Analog Input
  • Analog Output

Digital signals represent discrete states, while analog signals represent continuously varying process values within a defined range.

💬 NEED GUIDANCE IN PLC?

Contact THE ENGINEERS GROUP for eBook details, course information and learning support.

MESSAGE US ON WHATSAPP

3. What is Digital Input in PLC?

A Digital Input (DI) is a signal received by a PLC from a field device. It represents a discrete ON or OFF condition.

A digital input normally has two logical states:

  • Logic 0 – OFF
  • Logic 1 – ON

The actual electrical voltage corresponding to these states depends on the input module specifications and its configured signal type.

Common Digital Input Devices

  1. Push Buttons
  2. Limit Switches
  3. Proximity Sensors
  4. Photoelectric Sensors
  5. Selector Switches
  6. Float Switches
  7. Pressure Switches
  8. Temperature Switches
  9. Overload Relay Auxiliary Contacts
  10. Emergency Stop Circuit Feedback Contacts

Example: Push Button Input

Suppose a Start Push Button is connected to a PLC digital input.

  • When the push button is released, the input is in its normal state.
  • When the push button is pressed, the input changes state.
  • The PLC detects this change and executes the programmed logic.

Common Digital Input Voltage Levels

Industrial PLC digital input modules are available for different voltage levels, such as:

  • 24V DC
  • 48V DC
  • 110V AC
  • 230V AC

Important: Always verify the rated voltage and wiring diagram of the specific PLC input module before connecting a field device.

4. Digital Input Wiring Concepts

Digital input modules are commonly designed for sourcing or sinking input circuits.

PLC Digital Input and Digital Output wiring diagram showing 24V DC PNP proximity sensor, push button, limit switch, relay output, contactor, solenoid valve and digital signal representation.
PLC Digital I/O – Input Devices, Output Devices and Wiring Concepts.

PNP Sensor

A PNP sensor supplies positive voltage to the PLC input when activated.

  • Sensor output ON: approximately +24V DC in a typical 24V DC system.
  • Sensor output OFF: the output is inactive.

PNP sensors are commonly used with sinking input arrangements.

NPN Sensor

An NPN sensor switches the output toward 0V when activated.

  • Sensor output ON: output is pulled toward 0V.
  • Sensor output OFF: the output is inactive.

NPN sensors are commonly used with sourcing input arrangements.

Note: The exact connection depends on the PLC input circuit design. Check the manufacturer’s wiring diagram.

THE ENGINEERS GROUP
UPGRADE YOUR ENGINEERING SKILLS

Mastering PLC Programming and Industrial Automation

Learn PLC programming from fundamentals to industrial applications with this practical engineering eBook. Strengthen your automation knowledge and prepare for technical interviews.

WHAT WILL YOU LEARN?

✓ PLC Fundamentals
✓ Ladder Logic Programming
✓ Digital & Analog I/O
✓ Timers & Counters
✓ Motor Control
✓ Sensors & Industrial Control
✓ PLC Troubleshooting
✓ Industrial Automation
₹1,999 ₹349
SPECIAL OFFER PRICE
✔ Digital eBook
✔ For ITI, Diploma, B.Tech Students & Professionals
✔ Google Drive Download Link Delivery to Registered Gmail After Successful Payment
BUY PLC EBOOK NOW →

Secure Online Payment | Instant Purchase Access

ENGINEERING KNOWLEDGE FOR A BETTER TOMORROW

5. What is Digital Output in PLC?

A Digital Output (DO) is a signal sent from the PLC to an external device to control its ON/OFF operation.

Digital outputs are used when a field device requires a discrete control command.

Common Digital Output Devices

  1. Relay Coil
  2. Contactor Coil
  3. Solenoid Valve
  4. Indicator Lamp
  5. Buzzer
  6. Alarm Relay
  7. Motor Starter Control Circuit
  8. Interposing Relay

Types of Digital Output Modules

A. Relay Output

Relay output modules use electromechanical contacts to switch an external circuit.

Features:

  • Can switch AC or DC loads within specified ratings.
  • Provides electrical isolation through relay contacts.
  • Suitable for relatively low switching frequency.
  • Mechanical contacts have a finite operating life.

B. Transistor Output

Transistor output modules are generally used for DC loads.

Features:

  • Fast switching.
  • No mechanical contacts.
  • Suitable for high-frequency switching applications.
  • Available in sourcing and sinking configurations.

C. Triac Output

Triac output modules are designed for AC loads.

Features:

  • Used for switching AC circuits.
  • Suitable for frequent switching within module ratings.
  • Has leakage current and other AC switching characteristics that must be considered.

Example: Solenoid Valve Control

A PLC digital output can energize an appropriately rated relay or solenoid valve circuit.

When the programmed condition becomes TRUE, the output activates and the solenoid valve changes its operating state.

Always check the output module’s current, voltage, load type and protection requirements.

6. What is Analog Input in PLC?

An Analog Input (AI) is a continuously varying electrical signal received by a PLC from a field transmitter or sensor.

Unlike digital input signals, analog inputs represent a range of measured process values.

Analog input modules convert the incoming electrical signal into a digital value that the PLC CPU can process.

Common Analog Input Signals

  • 4–20 mA DC
  • 0–20 mA DC
  • 0–10 V DC
  • 1–5 V DC
  • RTD input through dedicated temperature modules
  • Thermocouple input through dedicated temperature modules

Important: RTDs and thermocouples are not directly equivalent to standard 4–20 mA or 0–10 V inputs. They generally require compatible temperature input modules or signal conditioning.

Common Analog Input Field Devices

  1. Pressure Transmitter
  2. Differential Pressure Transmitter
  3. Temperature Transmitter
  4. Level Transmitter
  5. Flow Transmitter
  6. pH Transmitter
  7. Conductivity Transmitter
  8. Position Transmitter

Example: Pressure Transmitter

Suppose a pressure transmitter has the following measuring range:

  • LRV = 0 bar
  • URV = 10 bar
  • Output = 4–20 mA

The transmitter sends a current signal corresponding to the measured pressure.

PressureOutput Signal
0 bar4 mA
2.5 bar8 mA
5 bar12 mA
7.5 bar16 mA
10 bar20 mA

The PLC analog input module reads the current and converts it into a numerical value.

7. Understanding the 4–20 mA Signal

The 4–20 mA signal is widely used in industrial instrumentation because it offers good noise immunity and supports long-distance signal transmission when properly installed.

PLC Analog Input and Analog Output wiring diagram showing a 2-wire 4–20 mA pressure transmitter, PLC analog modules, control valve positioner, 0–10 V signal and analog scaling formula.
PLC Analog I/O – 4–20 mA Signal, Wiring and Engineering Unit Scaling.

Why is 4 mA Used Instead of 0 mA?

4 mA is called the live zero.

It allows the receiving system to distinguish a valid zero measurement from certain fault conditions, such as a broken wire that causes the current to fall near zero.

For a standard 4–20 mA measurement:

  • 4 mA = 0% of measuring range
  • 12 mA = 50% of measuring range
  • 20 mA = 100% of measuring range

Analog Scaling Formula

To convert a measured current into an engineering value:

Engineering Value = (Measured Signal − Signal Minimum) / (Signal Maximum − Signal Minimum) × (Engineering Maximum − Engineering Minimum) + Engineering Minimum

Example:

A pressure transmitter has a range of 0–10 bar and sends 12 mA.

Engineering Value:

= (12 − 4) / (20 − 4) × (10 − 0) + 0

= 8 / 16 × 10

= 5 bar

Therefore, 12 mA represents 5 bar for this transmitter range.

8. What is Analog Output in PLC?

An Analog Output (AO) is a continuously varying electrical signal generated by a PLC output module to control an external device.

The PLC calculates a required control value and sends a corresponding analog signal to a field device.

Common Analog Output Signals

  • 4–20 mA
  • 0–20 mA
  • 0–10 V
  • ±10 V

The available signal types depend on the analog output module.

Common Analog Output Devices

  1. Control Valve Positioner
  2. Variable Frequency Drive (VFD) Speed Reference
  3. Damper Actuator
  4. I/P Converter
  5. Proportional Control Valve
  6. Analog Meter or Indicator

Example: VFD Speed Reference

A PLC analog output can send a 4–20 mA signal to a VFD.

Assume the VFD is configured as follows:

  • 4 mA = 0 Hz
  • 12 mA = 25 Hz
  • 20 mA = 50 Hz

When the PLC sends 12 mA, the VFD receives a 25 Hz speed reference, assuming the drive is configured for that scaling.

9. Difference Between Digital I/O and Analog I/O

ParameterDigital I/OAnalog I/O
Signal TypeDiscreteContinuous
Signal StatesON/OFFVariable range
Common Signals24V DC, AC voltage levels4–20 mA, 0–10 V
Input ExamplePush ButtonPressure Transmitter
Output ExampleRelay CoilControl Valve Positioner
ModuleDigital I/O ModuleAnalog I/O Module
ConversionLogic state detectionAnalog-to-digital or digital-to-analog conversion
Typical ApplicationMotor Start/StopPressure or Flow Control

10. Digital Input vs Analog Input

Digital InputAnalog Input
Detects discrete statesMeasures varying signals
ON/OFF informationProcess measurement
Used with switches and discrete sensorsUsed with transmitters
Example: Limit SwitchExample: Level Transmitter
Usually simpler signal processingRequires signal conversion and scaling

11. Digital Output vs Analog Output

Digital OutputAnalog Output
Sends discrete control commandsSends variable control signals
ON/OFF operationContinuous reference or command
Example: Solenoid ValveExample: Control Valve Positioner
Relay, transistor or triac outputCurrent or voltage output module

12. PLC Analog-to-Digital Conversion (ADC)

An analog input module converts an incoming analog signal into a digital numerical value.

This process is known as Analog-to-Digital Conversion (ADC).

For example:

A 4–20 mA transmitter sends a current signal to the PLC analog input module. The module converts the measured current into a numerical representation that the PLC CPU can use for calculations, alarms, displays and control logic.

The resolution of the analog module determines how finely the input signal can be represented.

Example

A 12-bit converter has:

2¹² = 4096 possible digital counts.

The actual usable count range and scaling depend on the module design and manufacturer.

13. PLC Digital-to-Analog Conversion (DAC)

An analog output module converts a digital value from the PLC program into a corresponding analog electrical signal.

This process is known as Digital-to-Analog Conversion (DAC).

Example:

The PLC program calculates a required valve opening of 50%. The analog output module generates the corresponding signal, such as 12 mA for a configured 4–20 mA range.

The valve positioner receives this signal and controls the valve according to its configuration.

14. Practical Industrial Application of PLC I/O

Consider a water tank level control system.

Digital Inputs

  • Pump Start Push Button
  • Pump Stop Push Button
  • Low-Level Switch
  • High-Level Switch
  • Motor Overload Feedback

Analog Input

  • Continuous Level Transmitter (4–20 mA)

Digital Outputs

  • Pump Contactor Command
  • Alarm Buzzer
  • Status Indicator Lamp

Analog Output

  • Speed Reference to VFD, if variable-speed pump control is required.

Working Principle

  1. The level transmitter continuously measures tank level.
  2. The analog input module receives the 4–20 mA signal.
  3. The PLC scales the signal into an engineering value, such as percentage or millimetres.
  4. The PLC program compares the measured level with configured setpoints.
  5. The PLC activates or deactivates the pump through a digital output, according to the control logic.
  6. If variable-speed operation is required, the PLC can send an analog reference to the VFD.
  7. Digital switches and overload feedback provide additional status and protection information.

Safety Note: Emergency stop and safety-related functions must be implemented using an appropriately designed and validated safety system. A standard PLC program or ordinary I/O module should not be assumed to provide safety-rated protection.

15. PLC I/O Addressing

PLC input and output addresses identify the signals used in a control program.

Addressing formats vary between PLC manufacturers and software platforms.

Examples of common addressing styles include:

I/O TypeExample Address
Digital InputI0.0
Digital OutputQ0.0
Analog InputIW64
Analog OutputQW64

These are illustrative Siemens-style address examples. Actual addresses depend on the PLC model, hardware configuration and project settings.

In a PLC program, the engineer assigns the field device to its corresponding I/O address and uses that address in the control logic.

16. Common Problems in PLC I/O Systems

Digital Input Problems

  • Incorrect field wiring.
  • Missing 24V DC supply.
  • Incorrect PNP/NPN compatibility.
  • Defective sensor.
  • Damaged input channel.
  • Loose terminal connection.

Digital Output Problems

  • Output channel not activating.
  • Blown fuse or tripped protection.
  • Short circuit or overload.
  • Defective relay or contactor coil.
  • Incorrect output wiring.
  • Output module fault.

Analog Input Problems

  • Broken transmitter cable.
  • Incorrect loop polarity.
  • Missing loop power.
  • Incorrect 4–20 mA configuration.
  • Wrong scaling parameters.
  • Electrical noise or grounding problems.
  • Defective transmitter or input channel.

Analog Output Problems

  • Incorrect output range configuration.
  • Open current loop.
  • Wrong polarity.
  • Incorrect VFD or positioner input configuration.
  • Incorrect scaling in PLC logic.
  • Defective analog output channel.

17. Practical PLC I/O Troubleshooting

Follow a systematic troubleshooting approach.

Step 1: Check Power Supply

Verify the PLC power supply and the field instrument supply.

Step 2: Check Wiring

Inspect terminals, polarity, cable continuity and wiring diagrams.

Step 3: Check Input Status

Use the PLC diagnostic or monitoring software to check whether the input channel changes state or value.

Step 4: Check Output Status

Verify whether the PLC program is commanding the output and whether the physical output channel is responding.

Step 5: Measure the Field Signal

Use an appropriate multimeter or process calibrator to measure voltage or current.

For a 4–20 mA loop, use a suitable method and instrument connection that does not unintentionally open the loop.

Step 6: Verify Scaling

Confirm the configured input range, raw value, engineering range and scaling formula.

Step 7: Check the Field Device

If the PLC channel and wiring are correct, inspect the sensor, transmitter, actuator or connected equipment.

Important: Follow site electrical safety procedures and isolate circuits where required. Never disconnect live wiring without understanding the circuit and its hazards.

18. Best Practices for PLC I/O Wiring

  1. Use the correct I/O module for the field signal.
  2. Verify voltage and current ratings before wiring.
  3. Follow the manufacturer’s wiring diagrams.
  4. Use suitable cable shielding for analog signals.
  5. Route analog signal cables separately from high-power cables where practical.
  6. Check polarity in DC and current-loop circuits.
  7. Apply correct grounding and shielding practices.
  8. Label all field cables and terminal connections.
  9. Configure scaling and signal ranges correctly.
  10. Perform I/O checks during commissioning.

19. Interview Questions and Answers – Digital and Analog I/O

Q1. What is I/O in PLC?
I/O stands for Input/Output. It is the interface through which a PLC receives signals from field devices and sends control signals to external equipment.

Q2. What is Digital Input?
Digital Input is a discrete signal received by the PLC, normally representing an ON or OFF condition.

Q3. What is Digital Output?
Digital Output is a discrete command sent by the PLC to operate a device such as a relay, contactor or solenoid valve.

Q4. What is Analog Input?
Analog Input is a continuously varying electrical signal received from a transmitter or sensor to represent a process measurement.

Q5. What is Analog Output?
Analog Output is a continuously varying current or voltage signal generated by the PLC to control an external device.

Q6. What is the most common industrial current signal?
4–20 mA is widely used in industrial instrumentation.

Q7. Why is 4 mA called Live Zero?
Because 4 mA represents the lower range value while a current near 0 mA can indicate certain loop faults, such as an open circuit.

Q8. What does 12 mA represent in a 4–20 mA signal?
It represents 50% of the configured measuring range.

Q9. What is the difference between Digital and Analog Input?
Digital Input detects discrete states, whereas Analog Input measures continuously varying signals.

Q10. What is the difference between Digital and Analog Output?
Digital Output provides discrete ON/OFF commands, whereas Analog Output provides variable current or voltage signals.

Q11. What is a PNP sensor?
A PNP sensor switches a positive supply voltage to its output when activated.

Q12. What is an NPN sensor?
An NPN sensor switches its output toward 0V when activated.

Q13. What is an ADC?
ADC stands for Analog-to-Digital Converter. It converts an analog signal into a digital numerical value.

Q14. What is a DAC?
DAC stands for Digital-to-Analog Converter. It converts a digital value into an analog electrical signal.

Q15. What is PLC analog scaling?
Analog scaling converts a raw analog input value into a useful engineering value, such as bar, °C, percentage or litres.

Q16. Which PLC output type is suitable for fast DC switching?
A transistor output is generally suitable for fast DC switching, within its rated specifications.

Q17. Which PLC output type can switch AC loads?
Relay and triac output modules can switch suitable AC loads, subject to their ratings and specifications.

Q18. What is an interposing relay?
An interposing relay is used between a PLC output and a field load to provide switching interface, isolation or additional contact capability as required.

Q19. What happens if a 4–20 mA transmitter cable breaks?
The loop current may fall toward zero, allowing the receiving system to detect a possible fault if the module and diagnostic settings support it.

Q20. Why is analog signal shielding important?
Proper shielding and grounding practices help reduce the effect of electromagnetic interference on sensitive analog signals.

20. Multiple Choice Questions (MCQs)

Q1. What does I/O stand for in PLC?

A) Input/Operation
B) Input/Output
C) Internal/Output
D) Industrial/Operation

Correct Answer: B) Input/Output

Q2. Which device is commonly connected to a PLC Digital Input?

A) Pressure Transmitter
B) Control Valve Positioner
C) Push Button
D) VFD Speed Reference

Correct Answer: C) Push Button

Q3. Which signal is widely used for industrial analog transmission?

A) 0–1 mA
B) 4–20 mA
C) 50–100 mA
D) 100–200 mA

Correct Answer: B) 4–20 mA

Q4. What does 12 mA represent in a 4–20 mA signal?

A) 0%
B) 25%
C) 50%
D) 100%

Correct Answer: C) 50%

Q5. Which device is commonly connected to a PLC Analog Input?

A) Push Button
B) Limit Switch
C) Pressure Transmitter
D) Contactor Coil

Correct Answer: C) Pressure Transmitter

Q6. Which output is generally suitable for fast DC switching?

A) Relay
B) Transistor
C) Triac
D) Analog Output

Correct Answer: B) Transistor

Q7. Which PLC module converts an analog signal into a digital value?

A) Digital Output
B) ADC
C) Relay
D) Communication Module

Correct Answer: B) ADC

Q8. What is the full form of DAC?

A) Digital Analog Control
B) Data Analog Converter
C) Digital-to-Analog Converter
D) Direct Analog Control

Correct Answer: C) Digital-to-Analog Converter

Q9. Which signal represents an ON/OFF condition?

A) Analog
B) Digital
C) Modulating
D) Continuous

Correct Answer: B) Digital

Q10. Which device can be controlled using a PLC Analog Output?

A) Push Button
B) Limit Switch
C) Control Valve Positioner
D) Emergency Stop Contact

Correct Answer: C) Control Valve Positioner

Q11. Which sensor commonly provides a PNP output?

A) PNP Proximity Sensor
B) RTD only
C) Thermocouple only
D) Passive Resistance Sensor

Correct Answer: A) PNP Proximity Sensor

Q12. What does 4 mA represent in a standard 4–20 mA measuring range?

A) 25%
B) 50%
C) 75%
D) 0%

Correct Answer: D) 0%

Q13. Which device is commonly controlled by a PLC Digital Output?

A) Pressure Transmitter
B) Solenoid Valve
C) Temperature Transmitter
D) Flow Transmitter

Correct Answer: B) Solenoid Valve

Q14. What is the primary purpose of analog scaling?

A) To increase PLC supply voltage
B) To convert raw signal values into engineering units
C) To reset the CPU
D) To change the communication protocol

Correct Answer: B) To convert raw signal values into engineering units

Q15. Which practice helps reduce interference in analog signal wiring?

A) Routing analog cables with motor power cables
B) Ignoring cable shielding
C) Using suitable shielding and grounding practices
D) Reversing signal polarity

Correct Answer: C) Using suitable shielding and grounding practices

21. Chapter Summary

In this chapter, we studied Digital and Analog I/O in PLC systems.

Key points:

  • Digital Input receives discrete ON/OFF signals.
  • Digital Output sends discrete control commands.
  • Analog Input receives continuously varying process signals.
  • Analog Output generates variable current or voltage signals.
  • 4–20 mA is a widely used industrial analog signal.
  • ADC converts analog signals into digital values.
  • DAC converts digital values into analog signals.
  • Analog scaling converts raw values into engineering units.
  • Correct wiring, configuration and troubleshooting are essential for reliable PLC operation.

Understanding PLC I/O is important for working with industrial sensors, transmitters, actuators, motors, control valves and automated process systems.

FREE 100 PLC INTERVIEW Q&A PDF DOWNLOAD

Download your free PLC learning material.

📥 DOWNLOAD FREE PLC PDF

THE ENGINEERS GROUP

22. What You Will Learn in the Next Chapter

Chapter 07 – PLC Scan Cycle

In the next chapter, we will study how a PLC executes its program, including:

  • Input Scan
  • Program Execution
  • Output Update
  • Scan Time
  • Scan Cycle Monitoring
  • PLC Response Time
  • Practical Scan Cycle Examples

THE ENGINEERS GROUP
ENGINEERING KNOWLEDGE FOR A BETTER TOMORROW

CONNECT WITH THE ENGINEERS GROUP

Learn. Practice. Improve. Grow.

📘 EXPLORE OUR EBOOK 💬 CONTACT US ON WHATSAPP ▶️ SUBSCRIBE ON YOUTUBE FOLLOW US ON FACEBOOK

THE ENGINEERS GROUP

Free Engineering Education for Everyone