PLC1 A
PLC1 A
PLC1 A
NCIII
PROGRAMMABLE LOGIC
CONTROLLER
Mechatronics
PROGRAMMABLE
LOGIC CONTROLLER
https://www.watelectronics.com/how-to-program-the-programmable-logic-controllers/
History of PLC
The PLC or Programmable Logic Controller has
revolutionized the automation industry.
Today PLCs can be found in everything from
factory equipment to vending machines, but prior
to New Year’s Day 1968 the programmable
controller didn’t even exist. Instead, what existed
was a unique set of challenges that needed a
solution.
Before the Programmable
Controller
Before the days of the PLC the
only way to control machinery
was through the use of relays.
Relays work by utilizing a coil
that, when energized, creates a
magnetic force to effectively
pull a switch to the ON or OFF
position.
Before the Programmable
Controller
When the relay is de-energized,
the switch releases and returns
the device to its standard ON
or OFF position. So, for
example, if I wanted to control
whether a motor was ON or
OFF, I could attach a relay
between the power source and
the motor.
There could be several motors in one factory
that need to be controlled, so what do you
do? You add lots of power relays. So
factories started to amass electrical cabinets
full of power relays. But wait, what switches
the coil in the power relays ON and OFF
before the power relay turns the motor ON,
and what if I want to control that? What do
you do? More relays.
These relays are known as control relays
because they control the relays that
control the switch that turns the motor ON
and OFF. I could keep going, but I think
you get the picture of how machines were
controlled pre-PLC, and, more
importantly, I think you start to see some
of the problems with this system of
electromechanical control via relays.
History of PLC
The Problem with Relays
Think about modern factories, and how many motors
and ON/OFF power switches you would need to
control just one machine. Then add on all the control
relays you need and what you get is… Yes, machine
control, but you also get a logistical nightmare.
All these relays had to be hardwired in a very specific
order for the machine to work properly, and heaven
forbid if one relay would have an issue,
History of PLC
the system as a whole would not work.
Troubleshooting would take hours, and because coils
would fail and contacts would wear out, there was
need for lots of troubleshooting.
These machines had to follow a strict maintenance
schedule and they took up a lot of space. Then what if
you wanted to change something? You would basically
have to redo the entire system. It soon became clear
that there were problems installing and maintaining
these large relay control systems
History of PLC
Let’s hear from a controls designer in the thick of
things in the early ‘70s
The relay based control systems I created included
anywhere from 50 to well over 100 relays. The
electrical enclosures to house the controls would
typically be six feet wide by four feet high, mounted
near the machinery. Picture lots of wires bundled and
laced together, connecting the relays, timers,
counters, terminals, and other components, all nice
and tidy.
History of PLC
Then picture after a few months or years the same
wiring, after many engineering changes and
troubleshooting, being out of the wire duct or
unlaced; in many cases wires were added in a
crisscross point to point pattern to take the shortest
route and amount of time to make the change. We
referred to the condition of these control enclosures
as a rat’s nest; reliability suffered, along with an
increase in difficulty during troubleshooting, or making
additional operational engineering changes.”
History of PLC
Birth of the PLC Solution
So what was the solution? I am sure this is the
exact question that engineers at the Hydra-Matic
division of General Motors were struggling with
every day. Fortunately, at that time, the concept of
computer control had started to make its way into
conversations at large corporations such as GM.
According to Dick Morley, the undisputed father
of the PLC, “The programmable controller was
detailed on New Year’s Day, 1968.”
History of PLC
The popular forum PLCDEV.com outlines a
list of requirements that GM engineers put
out for a “standard machine controller.” It is
this request that Dick Morley and his
company, Bedford and Associates, were
responding to when the first PLC was
envisioned. Besides replacing the relay
system, the requirements listed by GM for
this controller included:
History of PLC
1. A solid-state system that was flexible like a
computer but priced competitively with a like kind
relay logic system.
2. Easily maintained and programmed in line with the
already accepted relay ladder logic way of doing
things.
3. It had to work in an industrial environment with all
its dirt, moisture, electromagnetism and vibration.
4. It had to be modular in form to allow for easy
exchange of components and expandability.
The programming look of the PLC required that it be easily
understood and used by maintenance electricians and plant
engineers. As relay-based control systems evolved and
became more complicated, the use of physical component
location wiring diagrams also evolved into the relay logic
being shown in a ladder fashion. The control power hot wire
would be the left rail, with the control power neutral as the
right rail. The various relay contacts, pushbuttons, selector
switches, limit switches, relay coils, motor starter coils,
solenoid valves, etc., shown in their logical order would form
the ladder’s rungs. It was requested that the PLC be
programmed in this Ladder Logic fashion.
History of PLC
History of PLC
The PLC in its teenage years
The first PLCs had the ability to work with input and output
signals, relay coil/contact internal logic, timers and counters.
Timers and counters made use of word size internal
registers, so it wasn’t too long before simple four-function
math became available. The PLC continued to evolve with
the addition of one-shots, analog input and output signals,
enhanced timers and counters, floating point math, drum
sequencers and mathematic functions. Having built-in PID
(Proportional-Integral-Derivative) functionality was a huge
advantage for PLCs being used in the process industry.
History of PLC
Common sets of instructions evolved into fill-in-
the-blank data boxes that have made
programming more efficient. The ability to use
meaningful Tag Names in place of non-
descriptive labels has allowed the end user to
more clearly define their application, and the
ability to import/export the Tag Names to other
devices eliminates errors that result when
entering information into each device by hand
History of PLC
As the functionality of the PLC evolved, programming
devices and communications also saw rapid growth. The
first programming devices were dedicated, but
unfortunately the size of suitcases. Later, hand-held
programming devices came into the picture, but soon were
replaced with proprietary programming software running
on a personal computer. AutomationDirect’s DirectSOFT,
developed by Host Engineering, was the first Windows-
based PLC programming software package. Having a PC
communicating with a PLC provided the ability to not only
program, but also allowed easier testing and
History of PLC
Communications started with the MODBUS protocol
using RS-232 serial communications. The addition of
various automation protocols communicating over RS-
485, DeviceNet, Profibus, and other serial
communication architectures have followed. The use
of serial communications and the various PLC
protocols also allowed PLCs to be networked with
other PLCs, motor drives, and human to machine
interfaces (HMI). Most recently Ethernet and protocols
such as EtherNet/IP (for Industrial Protocol) have
gained tremendous popularity.
Step by Step Procedure of PLC Programming
Programmable Logic Controllers (PLCs) are the major
components in industrial automation and control systems.
The controlling nature of PLC is ranging from simple- push
button switching to a single motor to several complex
control structures.
The PLC programming is an important task of designing and
implementing control application depending on customers
need.
A PLC program consists of a set of instructions either in
textual or graphical form, which represents the logic to be
implemented for specific industrial real-time applications.
A dedicated PLC programming software comes from a
PLC hardware of specific manufacturer that allows
entry and development of user application code, which
can be finally download to the PLC hardware.
This software also ensures Human Machine Interface
(HMI) as a graphical representation of variables. Once
this program gets downloaded to the PLC and if the
PLC is placed in Run mode, then the PLC continuously
works according to the program.
Before going to the program of the PLC, let us know the
basics of the PLC programming and its basic concepts.
PLC Programming Basics
2. Graphical language
•Ladder Diagrams (LD)
•Function Block Diagram (FBD)
•Sequential Function Chart (SFC)
Compared with text-based languages, graphical
languages are preferred by many users to program
a PLC due to their simple and convenient
programming features.
All the necessary functions and functional blocks
are available in the standard library of each PLC
software. These function blocks include timers,
counters, strings, comparators, numeric,
arithmetic, bit-shift, calling functions, and so on.
PLC Programming Devices
Various types of programming devices are used to enter,
modify and troubleshoot a PLC program. These
programming terminal devices include handheld and PC
based devices. In the handheld programming device method,
a proprietary device is connected to PLC through a
connecting cable. This device consists of a set of keys that
allows to enter, edit and dump the code into the PLC. These
handheld devices consist of small display to make the
instruction that has been programmed visible. These are
compact and easy to use devices, but these handheld devices
have limited capabilities.
Most popularly a Personal Computer (PC) is used for
programming the PLC in conjunction with the software
given by the manufacturer. By using this PC we can
run the program in either online or offline mode, and
can also edit, monitor, diagnose and troubleshoot the
program of the PLC.
The way of transferring the program to the PLC is
shown in the above figure wherein the PC consists of
program code corresponding to control application
which is transferred to the PLC CPU via programming
cable.
PLC PROGRAMMING LANGUAGE
https://www.youtube.com/watch?v=kQ2CBzCCqic
Ladder Logic PLC Programming
Among several programming languages ladder logic diagram is
the most basic and simplest form of programming the PLC.
Before going to program the PLC with this language, one should
know some basic information about it. The below figure shows
the hardwired-ladder diagram wherein the same lamp load is
controlled by two push button switches, In case if any one of the
switches gets closed, the lamp glows. Here two horizontal lines
are called rungs which are connected between two vertical lines
called rails. Each rung establishes the electrical continuity
between positive (L) and negative rails (N) so that the current
flows from the input to output devices. Some of the symbols used
in ladder logic programming are shown in the figure.
L N
Push Button
Switch 1 Lamp
Rung 0
Push Button
Switch 2 Lamp
Rung 1
Switch On A
Switch On C
Switch On B
Yes
If
Switch On B Buzzer is On
Obstacle
No
Motor is started
and LED is On
Rung 2 L
C B
Rung 3 Bu
B A C