Abhinav Srivastav EE-3 Year
Abhinav Srivastav EE-3 Year
Abhinav Srivastav EE-3 Year
EE-3rd year
Overview
•Data
•Storage
Components
PLC Operation
Components
CPU
Memory Areas
Circuits to input or output data
We can actually consider the
PLC to be a box full of hundreds
or thousands of separate relays,
counters, timers and data
storage locations that don't
physically exist but rather they
are simulated and can be
considered software counters,
timers, etc.
Data Storage
Timers
•Input Relays (contacts) - These are connected to the outside
world. They physically exist and receive signals from switches, sensors, etc.
Typically they are not relays but rather they are transistors.
•Internal Utility Relays - 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 some are always off. Some are on only once during power-
on and are typically used for initializing data that was stored.
•Counters - These 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.
•Timers - These 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 millisecond
through 1 second.
•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 Operation
A PLC works by continually
scanning a program. We
can think of this scan cycle
as consisting of 3 important
steps. There are typically
more than 3 but we can
focus on the important parts
and not worry about the
others. Typically the others
are checking the system
and updating the current
internal counter and timer
values
What' happens in an operating cycle
•START
•1Input
•3. Output
•Scan •-
Scan
•- • •- PLC
•OPERATING
•
•During the input scan PLC
• CYCLE
•TYPICALLY
•examines the external input
•Based on the data in devices -On or Off.
• 1 to 25 ms.
•the output image file • The status
•- of the inputs is
•the PLC energises or •temporarily stored in an input
• de-energises it’s output image memory file.
•circuits,controlling
•external devices.
Comparison to Relay
Logic
Definition:-
Ladder logic is one form of
drawing electrical logic
schematics, and is a graphical
language very popular for
programming Programmable
Logic Controllers. Ladder logic
was originally invented to
describe logic made from
relays. The name is based on
the observation that programs
in this language resemble
ladders, with two vertical "rails"
and a series of horizontal
"rungs" between them.
Relay Logic
Ladder Logic
Relay Logic
Comparison to Relay Logic
A ladder diagram is similar to a schematic for a set of relay circuits. An argument that aided the initial
adoption of ladder logic was that a wide variety of engineers and technicians would be able to
understand and use it without much additional training, because of the resemblance to familiar
hardware systems.
This argument has become less relevant lately given that most ladder logic programmers have a
software background in more conventional programming languages, and in practice implementations of
ladder logic have characteristics such as sequential execution that make the analogy to hardware
somewhat imperfect.
Electricians and data cabling or control technicians still argue that this is the best graphical interface as
they generally do not have any computer science or digital systems background, and are therefore
taught with this interface in sequence with relay logic.
Relay logic is the precursor to ladder logic, and is a method of controlling industrial electronic circuits
by using relays and contacts.
. The schematic diagrams for relay logic circuits are often called line diagrams, because the inputs and
outputs are essentially drawn in a series of lines, with the lines representing actual wires run in the
circuit. A relay logic circuit is an electrical network consisting of lines, in which each input/output group
must have electrical continuity with all components in that group of devices to enable the output device.
The Relay logic diagrams represent the physical interconnection of devices, while the relay logic circuit
forms an electrical schematic diagram for the control of input and output devices. This is why
electricians and control technicians can easily understand and interpret relay logic and ladder logic
diagrams
Most widely used
program
Shown here as a very
small program
4. Ladder Logic Programming
Introduction
Basics – NO/NC Contacts/Coils
AND & OR Gates
Timers and Counters
Building a PLC Ladder Logic Programming
Introduction
Ladder logic was one of the first programming approaches used in
PLCs because it borrowed heavily from the relay diagrams that plant
electricians already knew.
The symbols used in relay ladder logic consist of a power rail to the
left, a second power rail to the right, and individual circuits that connect
the left power rail to the right.
The logic of each circuit (or rung) is solved from left to right. ----
Technicians think of it as “reading” the diagram
One line of instruction is called Rung.
as the following is the example of the rung
Basics
NO Contact
NC Contact