0% found this document useful (0 votes)
3 views

PLC

The document provides a comprehensive overview of Programmable Logic Controllers (PLCs), detailing their architecture, operation, programming languages, and applications across various industries. It highlights the core characteristics, advantages, and limitations of PLCs, along with the components involved in their operation and communication protocols. Additionally, it covers programming methodologies such as Ladder Logic, Function Block Diagram, and Structured Text, along with troubleshooting techniques.

Uploaded by

bonnybgirma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

PLC

The document provides a comprehensive overview of Programmable Logic Controllers (PLCs), detailing their architecture, operation, programming languages, and applications across various industries. It highlights the core characteristics, advantages, and limitations of PLCs, along with the components involved in their operation and communication protocols. Additionally, it covers programming methodologies such as Ladder Logic, Function Block Diagram, and Structured Text, along with troubleshooting techniques.

Uploaded by

bonnybgirma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 31

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

Flexibility: Easily reprogrammed for


Initial Cost: Can have a higher
different applications. initial investment compared to
traditional relay-based systems.
Modularity: Expandable with I/O modules
for various input/output needs. Programming Complexity:
Requires specialized knowledge
Reliability: Rugged and designed for and training for programming.
continuous operation in harsh industrial
Vendor Lock-in: Some
environments. proprietary systems may limit
flexibility and interoperability.
Diagnostics: Built-in diagnostics and
troubleshooting tools.

Safety: Integrated safety features to


prevent accidents.
Basic Architecture of a PLC
The architecture of a PLC consists of several core components working
together to execute control tasks.
Main components include:
● Power Supply: Converts AC power to the DC power required for
PLC operation.
● Central Processing Unit (CPU): Processes inputs, executes
programs, and updates outputs; Handles diagnostics and error
detection; Maintains system timing (real-time clock).
● Input/Output (I/O) Modules: Receive signals from sensors,
switches, and other devices.
● Communication Interfaces: Allow PLCs to communicate with
other devices and systems.
● Programming Device: A programming device (PC or dedicated
unit) is used to: Create and edit PLC programs, Upload/download
programs to the CPU, Monitor system performance in real-time.
Operation of a PLC
The PLC operates in a cycle known as the Scan Cycle, which
includes:

1. Input Scan: Reads the status of inputs (e.g., switches,


sensors). Converts analog signals into digital data using ADC
(Analog-to-Digital Converter).
2. Program Execution: Executes the user-defined logic based
on input data. Common languages include Ladder Logic,
Structured Text, and Function Block Diagram.
3. Output Scan: Updates the outputs (e.g., actuators, motors)
based on logic results. Uses DAC (Digital-to-Analog Converter)
for analog outputs.
4. Housekeeping: Conducts diagnostics, communication tasks,
and prepares for the next cycle.

Scan time: Milliseconds to seconds, ensuring real-time control.


Sensors and Actuators in PLC
Systems
Sensors: Detect physical conditions and provide data to the PLC.

● Proximity sensors, temperature sensors, pressure sensors, etc.

Actuators: Perform physical actions based on PLC commands.

● Solenoids, motors, valves, etc.

Signal Conditioning:

● Amplification, filtering, and conversion of signals for accurate


processing.
● Example: Converting a temperature sensor's low-voltage signal
into a readable range for the PLC.
Communication in PLC Systems
Importance of Communication:

● Data exchange between PLCs.


● Integration with SCADA (Supervisory Control and Data Acquisition)
systems.
● Remote monitoring and control.
● Data logging and historical data analysis.

Communication Protocols:

● Serial Communication: RS-232, RS-485 (for point-to-point or multi-


drop connections).
● Fieldbus: High-speed, industrial communication protocols (e.g.,
Profibus, Profinet, EtherNet/IP).
● Industrial Ethernet: Enables high-speed data exchange and
network connectivity.

Network Topologies: Star, ring, bus, and mesh topologies.


What devices does a PLC interact
with?
● INPUT RELAYS (contacts): Connect to the outside world. They physically
exist and receive signals from switches, sensors, etc. Typically, they are not
relays but rather transistors.
● INTERNAL UTILITY RELAYS (contacts): These do not receive signals from
the outside world, nor do they physically exist. They are simulated relays and
are what enables a PLC to eliminate external relays. There are also some
special relays that are dedicated to performing only one task. Some are
always on, while others are always off. Some are on only once during power-
on and are typically used for initializing data that was stored.
● COUNTERS:These again do not physically exist. They are simulated counters,
and they can be programmed to count pulses. Typically these counters can
count up, down, or both up and down. Since they are simulated, they are
limited in their counting speed. Some manufacturers also include high-speed
counters that are hardware-based. We can think of these as physically
existing. Most times these counters can count up, down, or up and down.
Cont’d
● TIMERS: These also do not physically exist. They come in
many varieties and increments. The most common type is an
on-delay type. Others include off-delay and both retentive and
non-retentive types. Increments vary from 1 ms through 1s.
● OUTPUT RELAYS (coils): These are connected to the outside
world. They physically exist and send on/off signals to
solenoids, lights, etc. They can be transistors, relays, or triacs,
depending upon the model chosen.
● DATA STORAGE: Typically there are registers assigned to
simply store data. They are usually used as temporary storage
for math or data manipulation. They can also typically be used
to store data when power is removed from the PLC. Upon
power-up, they will still have the same contents as before
power was removed.
PLC Programming
The process of instructing the PLC to perform specific tasks
based on input signals and control logic.

Programming Languages:

● Ladder Logic: Most common and user-friendly,


resembles relay ladder diagrams.
● Function Block Diagram (FBD): Uses graphical blocks
representing functions (e.g., AND, OR, NOT).
● Structured Text (ST): Text-based language similar to
high-level programming languages (e.g., Pascal).
● Instruction List (IL): Uses mnemonic codes to represent
instructions.
Program Organization
Divide the program into logical sections:

1. Initialization: Setup of variables and configurations.


2. Input Processing: Read and condition inputs.
3. Logic Execution: Process inputs to determine outputs.
4. Output Processing: Update outputs based on logic.

PLC Programming Software:

● Provided by PLC manufacturers (e.g., Rockwell Automation


RSLogix, Siemens TIA Portal).
● Offers tools for programming, debugging, and monitoring
PLC operation.
Ladder Logic
A graphical programming language that resembles relay ladder
diagrams.
Function Blocks:

● Power Rail: Represents the power supply. The power rails


simulate the power supply lines.
● Contacts: Represent input signals (normally open, normally
closed).
● Coils: Represent output signals (e.g., turning on a motor,
activating a solenoid).
● Logic Gates: AND, OR, NOT gates to implement complex logic.
● Timers and Counters: For time-based operations and
counting events.

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

R1 = PB1 .OR. (PB2 .AND. PB3)

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:

● LD: Load input signal.


● AND: Logical AND operation.
● OR: Logical OR operation.
● NOT: Logical NOT operation.
● OUT: Set the output signal.
● MOV: Move data between variables.
● JMP: Jump to a specific label.
● CALL: Call a subroutine.

Operands: Input/Output addresses, variables, constants.


Function Block
Feature Ladder Logic (LD) Structured Text (ST) Instruction List (IL)
Diagram (FBD)
User-friendly; intuitive for
Graphical interface; Text-based; requires Compact but requires
electricians and engineers
Ease of Use easy to visualize programming familiarity with
familiar with relay
functions. knowledge. mnemonic codes.
diagrams.
High-level textual Low-level textual
Representati Resembles electrical relay Graphical blocks
syntax (similar to instructions
on ladder diagrams. connected by lines.
Pascal). (mnemonics).
Best for advanced
Ideal for complex
Simple on/off control and logic and Suitable for resource-
Application systems with reusable
sequential logic. mathematical constrained systems.
functions.
operations.
Clear for
Clear for visual Difficult to read for
programmers but
Readability Easy to read for beginners. learners; harder for large or complex
challenging for
large systems. systems.
others.
Moderately flexible Limited flexibility;
Limited for complex Highly flexible for all
Flexibility with custom requires optimized
computations. types of logic.
functions. programming.
Execution Very high due to low-
Moderate. Moderate. High.
Speed level nature.
Common in manufacturing Advanced control Legacy systems and
Process control and
Use Cases and simple automation strategies and data compact coding
modular designs.
tasks. manipulation. requirements.
Learning
Low. Low to Moderate. Moderate to High. High.
Troubleshooting and Debugging
Common Issues:

● Incorrect program logic


● Wiring errors
● Faulty sensors or actuators
● Communication problems

Debugging Techniques:

● Use PLC diagnostic tools.


● Monitor input/output signals.
● Step through the program to identify errors.
● Use simulation software to test the program before
implementation.
Example
Oil is consumed randomly. The tank needs to be refilled by
turning on a pump. Two hydrostatic switches are used to
detect a high and low level.
Cont’d
Next Lecture
End of Class

You might also like