PLC
PLC
Tewedage Sileshi
Outline
● Introduction
● Architecture of PLC
● Operation of PLC
○ Sensors and Actuators in PLC Systems
○ Communication in PLC Systems
● PLC Programming
● Ladder diagram basics
● Simulation
Introduction
● A Programmable Logic Controller (PLC) is an industrial
computer designed for real-time control of machines,
processes, and systems.
● Functions include monitoring inputs, executing a user-
defined program, and controlling outputs.
Core Characteristics:
● Rugged and designed for industrial environments.
● Modular and scalable architecture.
● Deterministic execution for real-time applications.
Application of PLC
● Manufacturing and Assembly Lines: Automating tasks
such as sorting, packaging, and assembly.
● Robotics Control: Managing robotic arms in welding,
painting, and material handling.
● Process Control: Used in industries like oil and gas, food
processing, and chemical manufacturing.
● Building Automation: HVAC systems, lighting control, and
security systems.
● Transportation Systems:Traffic light control and railway
signaling.
Advantage Limitation
Signal Conditioning:
Communication Protocols:
Programming Languages:
The processor (or “controller controller)" scans ladder rungs from top
Anatomy of a Ladder Program
Cont’d
Contacts:
a. Normally open -| |-
b. Normally closed -|/|-
c. Off-on transitional -|↑|-
d. On-off transitional -|↓ |-
Coil:
a. Energize Coil -( )-
b. De-energize -(/)-
c. Latch -(L)-
d. Unlatch -(U)-
Cont’d
Logic Functions
● PLC programming is a logical procedure
● In a PLC program, “things” (inputs and rungs) are either TRUE or
FALSE
● If the proper input conditions are TRUE: The rung becomes
TRUE and an output action occurs (for example, a motor turns on)
● If the proper input conditions are not TRUE: The rung
becomes FALSE and an output action does not occur.
● Ladder logic is based on the following logic functions:
○ AND
○ OR: Sometimes called “inclusive OR.”
○ Exclusive OR
Cont’d
AND
Cont’d
OR
Cont’d
pb3
Cont’d
XOR
Logical Continuity
Function Block Diagram (FBD)
A graphical programming language where program logic is represented by
interconnected function blocks.
Function Blocks:
● Input Blocks: Represent input signals from sensors and switches.
● Output Blocks: Control actuators and output devices.
● Logic Gates: AND, OR, NOT, XOR for Boolean logic operations.
● Timers/Counters: Implement time-based operations and event
counting.
● Math Functions: Perform mathematical operations (e.g., addition,
subtraction, multiplication, division).
● Comparison Functions: Compare values (e.g., greater than, less
than, equal to).
Connections: Lines connecting the input and output terminals of function
blocks.
Structured Text (ST)
A text-based programming language for PLCs, similar to high-level
languages like Pascal.
Basic ST Elements
● Variables:
○ Declare variables to store data (e.g., input signals, output
signals, internal variables).
○ Data types: BOOL, INT, REAL, STRING, etc.
● Operators:
○ Arithmetic operators: +, -, *, /
○ Logical operators: AND, OR, NOT, XOR
○ Comparison operators: >, <, >=, <=, =, <>
● Control Flow Statements:
○ IF-THEN-ELSE: Conditional execution based on a condition.
○ CASE: Select a block of code to execute based on a value.
○ FOR loop: Repeat a block of code a specified number of times.
○ WHILE loop: Repeat a block of code as long as a condition is
true.
Instruction List (IL)
A text-based programming language using mnemonics and
operands to represent instructions.
Instructions:
Debugging Techniques: