0% found this document useful (0 votes)
10 views79 pages

Understanding Programmable Logic Controllers

Programmable logic controller

Uploaded by

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

Understanding Programmable Logic Controllers

Programmable logic controller

Uploaded by

amadormarkdexter
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PROGRAMMABLE

PROGRAMMABLE

LOGIC
CONTROLLER
CONTROLLER

(PLC)
Programmable A programmable logic controller
(PLC) is an industrial grade
Logic computer that is capable of
Controller being programmed to perform
control functions.

A digital computer designed for


use in machine control.

It has been designed to operate


in the industrial environment,
and is equipped with special
input/output interfaces and a
control programming language.
PLC ( a ) Relay based control panel

• Microprocessor-based controller,
uses programmable memory to
store instructions to implement
functions like, logic, sequence,
timing, etc. to control machines and
processes

( b ) PLC-based control panel


All the logic is contained in the
PLC’s memory

Relationships between the inputs and


outputs are determined by the user
program
ADVANTAGES
ADVANTAGES
• Less wiring: Wiring between devices and relay contacts are done in the PLC program.

• Easier and faster to make changes.

• Troubleshooting aids make programming easier and reduce downtime.

• Reliable components make these likely to operate for years before failure.

• Increased Reliability: Once a program has been written and tested it can be downloaded to other PLCs.

• More Flexibility: OEMs can provide system updates for a process by simply sending out a new program.

• Lower Costs: Originally PLCs were designed to replace relay control logic.
Programmable Logic Controller-
Principles of Operation

PLC power supply converts a line voltage, i.e. AC into a DC voltage,


required by the CPU and I/O module in the rack.
In Modular PLC racks, the power supply is the part of rack.
A battery backup, to provide energy to the memory of the PLC in case
of a power supply failure
Programmable Logic Controller-
Principles of Operation

CPU Module (Central Processing Unit)


Acts as the brain of the PLC.
Contains CPU, ROM, and RAM.
ROM stores the operating system and
essential programs.
RAM stores user programs and data.
Performs logic operations, controls
communication, and checks system status.
PLC SCAN
PLC SCAN CYLE
CYLE The PLC program is executed as part of a
repetitive process, referred as scan.
PLC scan starts with the CPU reading the
status of inputs, then, the application
program is executed.
Once the program execution is complete,
the CPU performs internal diagnostic
and communication tasks.
Next, the status of all outputs is updated.
This process is repeated continuously as
long as the PLC is in the run mode
Programmable Logic Controller-
Principles of Operation

lnput / Output (l/O) circuitry


I/O unit provides the interface between
the system and outside world.
Programs are entered into using the input
unit.
The programs, can also be entered by
means of PC, with an appropriate software
package.
Input devices can be start and stop
pushbuttons, switches etc.
Output devices can be an heater, valves,
relays etc.
Memory: The memory elements available in PLC are;
ROM: Permanent storage for the OS and fixed data.
RAM: For user's program.
Programs in RAM can be changed by the user.
To prevent the loss of these programs, when the supply
is switched off, a battery is provided in the PLC to
maintain the RAM contents for a period of time.
I/O circuitry
The I/O channel provides signal
conditioning and isolation
functions so that sensors and
actuators can be directly
connected to them without the
need for other circuitry
Inputs might be limit switches
which are activated when some
event occurs. • The outputs might
be motor, starter coils, solenoid
valves, etc. • Electrical isolation
from the external world is usually
by means of optical isolators.
PRINCIPLES OF
OPERATION
PRINCIPLES OF OPERATION
Consider the simple process control
problem illustrated in Fig.
A mixer motor is to be used to
automatically stir the liquid in a vat
When the temperature and pressure
reaches a preset values.
A direct manual operation of the motor
is provided by means of a separate
pushbutton station.
The process is monitored with
temperature and pressure sensor
switches that close their respective
contacts when conditions reach their
preset values.
PRINCIPLES OF OPERATION
This control problem can be solved by
relay method for motor control, shown
in the relay ladder diagram (Fig.) • The
motor starter coil (M) is energized when
both the pressure and temperature
switches are closed or when the manual
pushbutton is pressed.
PRINCIPLES OF OPERATION
PLCs might be used for this application.
• The input field devices (pressure
switch, temperature switch, and
pushbutton) are used. • These devices
would be hardwired to an appropriate
input module as shown in fig.
Wiring connections for a 120 VAC modular configured
input module
PRINCIPLES OF OPERATION

The output field device (motor, starter


coil) would also be used. • This device
would be hardwired to an appropriate
output module
PRINCIPLES OF OPERATION
The PLC ladder logic program would be
constructed and entered into the
memory of the CPU.
A typical ladder logic program for this
process is shown in Fig
PRINCIPLES OF OPERATION

The layout is like a hardwired relay ladder circuit, where symbols are
instructions and numbers show their memory addresses.
Instructions are entered into the PLC’s memory one by one using a
programming device.
Each input and output device has an address so the PLC knows its
physical connection. The format of these addresses varies by PLC
model and manufacturer.
Principles of Operation:
Instructions are stored in the user program section of the processor
memory.
During each scan, the PLC checks input status, runs the program, and
updates outputs accordingly.
PRINCIPLES OF OPERATION

Each symbol ‘II’ can be


thought of as a set of normally
open (NO) contacts.
The symbol –( )- represents a
coil, when energized, will close
a set of contacts.
PRINCIPLES OF OPERATION

The coil O/1 is energized, when contacts


I/1 and I/2 are closed or when contact
I/3 is closed.
Either of these conditions provides a
continuous logic path from left to right
across the rung that includes the coil.
PLC
Programming
Language
How To read Logic Ladder ?

Mark Dexter Amador


PLC
Programming
Language
• The term PLC programming language refers to the method by which
the user
communicates information to the PLC.
• The standard IEC 61131 was established to standardize the multiple
languages.
Schematics
1. Ladder Diagram (LD): A graphical
representation of a process with
rungs of logic,
similar to the relay ladder logic
schemes that were replaced by PLCs.
Ladder Logic /
Ladder Program /
Ladder diagram (LD)
Ladder
Logic
Used to program a PLCs.
• It is a graphical programming language which
expresses logical operations with
symbols and notation using ladder diagrams.
• Used to execute logical, sequential, counting, timing
and arithmetic tasks in order
to carry industrial automation applications.
Ladder Logic
Concept
In the earlier days, machine and process automation
was accomplished using a hard wired control
system
known as relay logic.
• Ladder logic was originally designed to replace the
use of hard wired relay logic circuits for machine
control.
• The ladder logic programming code resembles as
of
an electrical schematic drawing.
Ladder Logic / Ladder Program
In PLC programming, ladder logic is a programming language,
used for developing logical expressions in order to automate tasks /
process.
Ladder logic is used extensively for programming PLCs in
industrial automation
applications.
The Logic Behind The Ladder
4. Outputs: Outputs are external devices (Actuators).
E.g. Turn on and off an electric motor or a solenoid valve/coil.
• The outputs are hardwired to the PLC terminals.
• Represented in the ladder diagram by a relay coil symbol.
The Logic Behind The Ladder
5. Logic Expressions: The logic expressions are used in combination with the
inputs and outputs to formulate the desired control
operations.
6. Address Notation: Address notation describes the input, output, logic
expression,
memory addressing structure of the PLC.
• Tag names: descriptions allocated to the addresses.
The Logic Behind The Ladder

7. Comments:
• Important part of a ladder diagram.
• Comments are displayed at the start of each rung.
• Used to describe the logical expressions and control
operations of that rung.
• Understanding ladder diagrams are easier by using
comments.
The Logic Behind The Ladder
Microprocessors operates on the binary concept.
‘Binary’: principle, is that the event/s can be thought of
in one of two states.
The states can be defined as:
• 1 or 0
• True or False
• On or Off
• High or Low
• Yes or No
The Logic Behind The Ladder
• Ladder logic uses symbolic expressions and a
graphical editor for reading and
writing code making it easier.
• If real world event is translated into ladder logic, it
symbolically expressed in the
form of a normally open (NO) contact.
E.g. events like a button being pushed or a limit switch
being activated
The Logic Behind The Ladder
Example
• Consider event ‘A’, has one of two states, TRUE or FALSE (1 or 0).
• Event is associated with the normally open (NO) contact can be TRUE or FALSE.
• If the event is TRUE, highlighted in green
The Logic Behind The Ladder
• A normally open (NO) contact alone cannot decide what action
to take to
automate the event
• It merely tells, what is the state of the event.
• Logic is the ability to decide what action needs to be taken
depending on the
state of one or more events.
• Logic concept – IF, THEN logic functions.
The Logic Behind The Ladder
In ladder logic fundamental logic functions
are;
1. AND
2. OR
3. NOR
4. NAND
5. XOR
The Logic Behind The Ladder
The sequence followed by a PLC when carrying out a
program
1. Scan the inputs associated with one rung of the ladder
program.
2. Solve the logic operation involving those inputs.
3. Set/reset the outputs for that rung.
4. Move on to the next rung and repeat operations 1, 2, 3.
5. Move on to the next rung and repeat operations 1, 2, 3.
6. So on until the end of the program with each rung of the
ladder program.
The PLC then goes back to the beginning of the program and
starts again.
Timers
Timers
EXAMPLE

A MOTOR OR A PUMP NEED TO BE CONTROLLED TO OPERATE FOR A


PARTICULAR INTERVAL OF TIME OR TO BE SWITCHED ON AFTER SOME TIME
INTERVAL.

PLCS HAVE TIMERS AS BUILT-IN DEVICES.

TIMERS COUNT SECONDS OR FRACTIONS OF SECONDS USING THE INTERNAL


CPU CLOCK.
Timers
The timers behave like relays with
coils that when energized, result in
the closure or opening of contacts
after some preset time.
a) The timer is treated as an output
for a rung, with control being
exercised over
pairs of contacts.
b) Timer as a delay block, inserted in a
rung, delays signals in that rung from
reaching the output.
FORMS OF TIMERS

There are a number of different forms of timers found with PLCs:


1. on-delay
2. Off-delay
3. Pulse
With small PLCs, just one form of timers are used i.e. the on-delay
timers
As per IEC, the symbols denote:
• TON is used to denote on-delay, TOF off-delay, and TP pulse
timers.
• On-delay is also represented by T-0 and off-delay by 0-T.
TIMERS

IEC 1131-1 standards


• IN is the Boolean input. Q is the Boolean output.
• ET is the elapsed time output.
• PT is the input used to specify the time delay or pulse duration
required
TIMERS
On-delay timer

All PLCs have on-delay timers.


The Allen-Bradley timer symbol shows the type of timer concerned with;
• The timer address, and the time base that indicates the increments by
which the timer moves to the preset value, such as 0.001 s, 0.01 s, 0.1 s or 1
s.
• The preset value (PRE) is the number of time increments that the timer
must accumulate to reach the required time delay.
• The accumulator (ACC) indicates the number of increments that the timer
has accumulated while the timer is active and is reset to zero when the
timer is reset
TIMERS
On-delay timer
The Allen-Bradley timers have three Boolean
bits for ladder logic control:

• A timer enable bit (EN), which goes on when


the timer accumulator is Incrementing

• A timer done bit (DN), which goes on after


the set time delay.

• A timer timing bit (TT) is on when the


accumulator is incrementing and remains on
until the accumulator reaches the preset
value.
INTERNAL RELAYS
Internal relays are virtual relays stored in PLC
memory.
do not exist physically but act like real relays in
logic control.
Used to turn ON/OFF other devices within the
program.
Activated in one rung of the program and used in
other rungs.
Different manufacturers use different terms for
internal relays and have different ways of
expressing their addresses

Example: Mitsubishi uses the term auxiliary relay or


marker and the notation M100, M101
COUNTERS
Counters are provided as built-in elements in PLCs and allow the
number of occurrences of input signals to be counted.

Example: Items have to be counted as they pass along a conveyor belt / the
number of revolutions of a shaft / number of people passing through a
door.

A counter is set to some preset number value, when this value of input
pulses has been received, it will operate its contacts. Normally open
(NO) contacts would be closed, normally closed (NC) contacts opened
FORMS OF COUNTERS
1. Down-counters count down from the preset value to zero, events are subtracted
from the set value. When zero is reached, the contacts change state. Most PLCs
support down-counting.
2. Up-counters count from zero up to the preset value, events are added until the
number reaches the preset value. When the preset is reached, the contacts
change state..
JUMP
Allows the program to skip rungs if a condition is met.
Used for conditional logic (e.g., temperature control).
SHIFT REGISTERS
A register consists of multiple internal bits (8, 16, or 32).
Bits can be shifted one position when commanded.
Requires load, shift, and reset inputs.
DATA HANDLING
Data handling involves:
Moving numeric values between registers
Comparing two values
Selecting max/min/conditional values
Used to support more advanced automation
requiring math or comparisons.
DATA MOVEMENT
Moves data from one register/memory location to
another.
Used when conditions change and new values must
be loaded into registers.
Common formats vary by brand (Mitsubishi, Allen-
Bradley, Siemens).
DATA COMPARISON
PLC compares two values (S and D).
Operators include: greater than, less than, equal, etc.
Example in ST:
Output = P2 < P1
Ladder programs use dedicated compare blocks for
these operations.
DATA SELECTION
LATCHING CONCEPT
Latching holds a coil energized after the input signal
disappears.
Self-maintaining circuit using feedback contacts.
Output remains energized until Reset/Stop input is triggered.

How It Works:
Start button (NO) is pressed → Output turns ON.
Output energizes its own contact, creating a second path.
Even when the Start button is released, the output stays
ON.
Stop button (NC) is pressed → This opens the circuit and
turns output OFF.
PLC SELECTION CRITERIA
Application Requirements – must break tasks into simple PLC
functions.
System Requirements – number of I/O channels + special functions.
Speed of Operation – process speed determines PLC scan time
needs.
Electrical Requirements – power input and output levels.
Communication Needs – ability to communicate with
computers/HMI.
Operator Interface – type of pushbuttons, displays, message panels.
Physical Environment – protection from heat, dust, vibration.
Vendor Selection – features, expansion, support, cost
Closing

Technology is not just about


machines but about the
connections they create. Each
device tells a story of progress,
shaping a world where information
and imagination flow freely.

You might also like