Digital Control Systems
Introduction to PLCs
Programmable Logic •What is a PLC?
Control (PLC) •Key Features of a PLC
•Difference Between PLCs and Microcontrollers
For 3rd level - 2019 Regulation – Lec. 8
•Applications of PLCs in Industry
2nd Semester - Academic Year: 2024 – 2025
Presented By:
Dr. Eman Samir Mohamed
1 2
What is a PLC? (Programmable Logic Controller)
Key Features of a PLC
1. Programmable Control
2. Modular & Expandable
3. Real-Time Operation
4. Rugged Design & Reliable متين وموثوق
5. Communication Capabilities
Advantages of Using PLCs
Reliability
Flexibility
High-Speed Processing
Space-Efficient
PLC is a specialized industrial computer used to automate and control machinery and Connectivity
processes in manufacturing, energy, transportation, and other industries. Faster Troubleshooting
Scalability
It is designed to operate reliably in harsh environments with high noise, temperature
variations, and electrical interference.
3 4
PLC (Programmable Logic Microcontroller
Difference Between PLCs and Microcontrollers POC
Controller)
❑ Both PLCs (Programmable Logic Controllers) and Microcontrollers (like ▪ Industrial automation (robust, ▪ Embedded systems
Arduino, STM32, or PIC)are used in automation and control applications, Purpose reliable control) (prototyping, consumer
but they serve different purposes and are designed for different electronics)
environments. ▪ Rugged ▪ Typically used in
Environment
controlled environments
▪ Ladder logic, Structured Text, ▪ C, C++, Arduino
Programming
Function Block Diagram (simplified C++)
Real-Time ▪ Deterministic ▪ May or may not be real-
Operation time
I/O Handling ▪ Modular, expandable ▪ Fixed or limited expansion
Reliability ▪ High ▪ Moderate
Cost ▪ Expensive (industrial-grade) ▪ Cheap (hobbyist-friendly)
▪ Siemens S7, Allen-Bradley, ▪ Arduino, STM32, ESP32,
Examples
Mitsubishi FX Raspberry Pi Pico
5 6
When to Use Which? Applications of PLCs:
• Use a PLC if: 1. Industrial Automation
You need industrial reliability (24/7 operation). •Controlling conveyor belts أحزمة النقلin manufacturing plants.
The environment has electrical noise/vibrations.
The system requires easy maintenance by technicians. •Automating robotic arms for assembly.
• Use a Microcontroller if: •Robotics and Motion Control (الروبوتات والتحكم في الحركةautomated
arms, CNC machines آالت،) األذرع اآللية
You’re prototyping or building a custom device.
Cost is a major factor (hobby projects, small-scale automation). •Manufacturing Automation (assembly lines )خطوط التجميع
You need flexibility in programming (C++/Python). •Building Management Systems (أنظمة إدارة المبانيHVAC, lighting
control التحكم في اإلضاءة،) التدفئة والتهوية وتكييف الهواء
Can a Microcontroller Replace a PLC?
Sometimes—but with limitations. Projects like home automation or small •Monitoring temperature, pressure, and flow in oil & gas.
robots can use microcontrollers, but for mission-critical industrial machines,
a PLC is still the best choice. 2. Building Automation
•Controlling HVAC (Heating, Ventilation, Air Conditioning).
•Lighting control in smart buildings.
7 8
3. Water Treatment Plants
•Pump control to regulate water flow.
•Filtration and chemical dosing automation.
•Water Treatment Plants (محطات معالجة المياهpump control, chemical dosing
الجرعات الكيميائية،)التحكم في المضخات
4. Power Plants
•Load balancing and turbine control.
•Generator synchronization.
Difference Between PLCs and Microcontrollers
•Power Plants (محطات الطاقةgenerator control, load balancing التحكم في
موازنة الحمل،)المولدات
9 10
1. PLC Architecture & Components
Basic Components of a PLC
1.CPU (Central Processing Unit) – “Executes control instructions and
PLC Hardware Components processes input/output signals.”
1. PLC Architecture & Components •The brain of the PLC that processes logic.
• CPU (Central Processing Unit) •Executes the user program stored in memory.
• Input & Output Modules (I/O) •Manages communication with input/output (I/O) devices.
• Power Supply
• Memory & Storage 2. Power Supply
2. Types of PLCs (Compact vs. Modular) • Provides the necessary voltage (typically 24V DC or 120/230V AC).
• Ensures stable operation of the PLC and connected components.
3. How a PLC Works “Basic Operating Cycle of a
PLC” 3. Programming Device
4. PLC Communication Protocols • A computer or handheld terminal used to create and upload PLC
programs.
• Common programming languages: Ladder Logic (LD), Function
Block Diagram (FBD), Structured Text (ST).
11 12
4. Input/Output (I/O) Modules – “Connects the PLC to sensors, switches, 1. PLC CPU (Central
and actuators.” Processing Unit)
•The main module with a
❑ Input Modules
display and keypad
•Receive signals from sensors (e.g., temperature, pressure, limit switches).
•Converts analog or digital signals into data that the CPU can process. 2. Input/Output (I/O)
❑ Output Modules Modules
•Send control signals to actuators, motors, relays, and other devices. •They connect field devices
•Can be digital (on/off) or analog (variable control). like sensors (inputs) and
actuators (outputs).
Digital Inputs: Sensors, switches, push Digital Outputs: Motors, solenoids,
buttons. relays. 3. Power Supply Unit
Analog Inputs: Temperature, pressure, Analog Outputs: Variable Frequency
4. Relays and Terminal Blocks
flow sensors. Drives (VFDs), actuators.
•The top section contains
multiple relays and wiring
5. Communication Modules connections.
• Enable the PLC to communicate with other controllers, SCADA
(Supervisory Control and Data Acquisition) systems, and industrial networks. 5. Communication Modules
• Common protocols: Modbus, Ethernet/IP, PROFIBUS, CANopen. •Located near the PLC CPU
(lower right side). 6. Wiring and Connections
•The image shows multiple neatly arranged
13 14
wires connecting all modules.
2. Types of PLCs: Compact vs. Modular
POC Compact PLC “Integrated Modular PLC
❑ PLCs are classified based on their structure and expandability.
❑ The two main types are Compact PLCs and Modular PLCs. PLC”
Definition ▪ has a fixed configuration ▪ Consists of separate modules
▪ Simple automation tasks (e.g., ▪ Large industrial automation
Applications conveyor systems, small (factories, process plants).
machines)
▪ Siemens LOGO! 8 ▪ Siemens S7-300 / S7-1500
Example ▪ Allen-Bradley MicroLogix ▪ Allen-Bradley ControlLogix
Models 1100 ▪ Omron CJ-Series
▪ Mitsubishi FX-Series
Size ▪ Small, integrated unit ▪ Larger, modular structure
I/O ▪ Fixed number of I/Os ▪ Expandable I/O modules
Expandabili
ty
Flexibility ▪ Limited customization ▪ Highly flexible & customizable
15 16
3. How a PLC Works “Basic Operating Cycle of a PLC”
A PLC operates in a cyclic manner following these four key steps:
1. I/P scan:
❑ The PLC reads input signals from connected sensors.
❑ Inputs can include signals from:
•Push buttons, switches, Sensors,Encoders, limit switches, photoelectric sensors
Modular PLC Siemens S7-300 2. Program Execution (Logic Solving)
“Processes logic based on a pre-programmed control sequence”
•The program is written in one of the PLC programming languages (e.g., Ladder
Modular PLC Siemens S7-1500
Logic, Function Block Diagram, Structured Text).
3. Output Scan
“Sends output signals to actuators (e.g., motors, valves, relays) to perform actions”
4. Housekeeping (Internal Diagnostics & Communication)
•The PLC performs self-checks, memory management, and communication with
Compact PLC external devices.
Siemens LOGO! 8
17 18
4. PLC Communication Protocols
❑ They enable data exchange between PLCs and other devices
Types of PLC Communication Protocols
A. Industrial Fieldbus Protocols (Wired)
B. Ethernet-Based Protocols (High-Speed, Flexible) Basics of Electrical Wiring for PLCs
C. Wireless Protocols (Remote Monitoring & IoT) 1. Digital vs. Analog Signals
2. Signal Conversion in PLCs: ADC & DAC
3. Understanding Sensors and Actuators
Choosing the Right Protocol 4. Wiring Inputs & Outputs to a PLC
For real-time machine control → PROFIBUS, PROFINET, EtherCAT 5. Safety Considerations in PLC Wiring
For industrial Ethernet communication → EtherNet/IP, Modbus TCP
For remote wireless monitoring → Wi-Fi, LoRaWAN
For energy & SCADA systems → Modbus RTU/TCP
19 20
1. Digital vs. Analog Signals in PLCs Digital Signals (Discrete
POC Analog signals
❑ PLCs process two main types of signals: Digital (Discrete) Signals and Analog Signals)
Signals. These signals are used to interface with sensors, actuators, and other
Examples:
industrial devices.
Digital Signals (Discrete I/P Device Temperature
Pressure
POC Analog signals “Signal state/ Push Limit Proximity Sensor Flow
Signals) Button Switch Sensor (RTD/Thermoc
Transmitt
Meter
signal range” er
▪ have only two states: ▪ vary continuously within a range, ouple)
ON (1) or OFF (0). representing real-world physical ON/OF
Definition ON/OFF ON/OFF 0-100°C 4-20mA 0-10V
values like temperature, pressure, F
and speed.
O/P Device Solenoid Valve Variable Speed
▪ Binary Representation ▪ Continuous Data Representation Relay Control Valve
▪ Fast & Noise-Resistant ▪ More Sensitive to Noise
“Signal state/ Drive (VFD)
Characteristics
▪ Used for Switching ▪ Used for Monitoring & Control signal range”
ON/OFF ON/OFF 0-10V 4-20mA
Data Type Discrete (ON/OFF) Continuous (Variable)
Example
Push buttons, limit switches Temperature sensors, flow meters
Devices
21 22
2. Signal Conversion in PLCs: ADC & DAC
❑ In PLC systems, Analog-to-Digital Converters (ADC) and Digital-to-Analog
Push Button Converters (DAC) are used to convert signals between digital and analog formats.
Temperature Sensor
Analog-to-Digital Conversion Digital-to-Analog Conversion
Solenoid Valve POC
(ADC) (DAC)
▪ Converts an analog signal (e.g., ▪ Converts a digital signal from
Variable Speed temperature, pressure) into a the PLC into an analog output
Drive (VFD) Purpose
Limit Switch digital format for processing by the signal to control external
PLC. devices.
Pressure Transmitter Relay
▪ PLCs only process digital signals, ▪ Some actuators and industrial
Why
Digital so analog signals must be devices require continuous
Needed converted. signals.
Control Valve
Proximity Sensor
Flow Meter
Digital
Analog
I/P Device Analog
23 24
O/P Device
Key Concepts in Signal Conversion
Number of bits used in conversion (e.g., 8-bit (256 levels), 12-bit (4096 Analog-to-Digital Digital-to-Analog Conversion
Resolution: POC
levels)). Higher resolution = More precise signal conversion. Conversion (ADC) (DAC)
Sampling The number of times per second the PLC samples the analog signal Application Examples in Industry
Rate: (measured in Hz).
Application Sensor Type Signal Type Conversion Used
PLCs scale raw digital values to meaningful engineering units (e.g., 0-
Scaling: Temperature
4095 → 0-100°C). • RTD Sensor • Analog (4-20mA) • ADC
Monitoring
Resolution and scaling affect accuracy in industrial automation.
Pressure • Pressure
• Analog (0-10V) • ADC
Control Transmitter
• Variable
Motor Speed • Digital (PLC
Frequency Drive • DAC
Control Output)
(VFD)
Liquid Level • Ultrasonic Level
• Analog (4-20mA) • DAC
Control Sensor
• is needed for PLCs to • is used when a PLC controls an
Conclusion
read analog sensor data. analog actuator.
25 26