Programmable Logic Controller (PLC) Is A Digital Computer Used For The Automation of Various
Programmable Logic Controller (PLC) Is A Digital Computer Used For The Automation of Various
Programmable Logic Controller (PLC) is a digital computer used for the automation of various
electro-mechanical processes in industries. These controllers are specially designed to survive in harsh
situations and shielded from heat, cold, dust, and moisture etc. PLC consists of a microprocessor which
is programmed using the computer language.
A programmable logic controller (PLC) is an industrial solid-state computer that monitors inputs and
outputs, and makes logic-based decisions for automated processes or machines.
The program is written on a computer and is downloaded to the PLC via cable. These loaded programs
are stored in non – volatile memory of the PLC. During the transition of relay control panels to PLC,
the hard wired relay logic was exchanged for the program fed by the user. A visual programming
language known as the Ladder Logic was created to program the PLC.
System requirements
* The starting point in determining any solution must be to understand what is to be achieved.
* The program design starts with breaking down the task into a number of simple understandable
elements, each of which can be easily described.
Application requirements
* Input and output device requirements. After determining the operation of the system, the next step is
to determine what input and output devices the system requires.
* List the function required and identify a specific type of device.
* The need for special operations in addition to discrete (On/Off) logic.
* List the advanced functions required beside simple discreet logic.
Electrical Requirements
The electrical requirements for inputs, outputs, and system power; When determining the electrical
requirements of a system, consider three items:
Incoming power (power for the control system);
Input device voltage; and
Output voltage and current.
Speed of Operation
How fast the control system must operate (speed of operation).
When determining speed of operation, consider these points:
– How fast does the process occur or machine operate?
– Are there “time critical” operations or events that must be detected?
– In what time frame must the fastest action occur (input device detection to output device activation)?
– Does the control system need to count pulses from an encoder or flow-meter and respond quickly?
Communication
If the application requires sharing data outside the process, i.e. communication. Communication
involves sharing application data or status with another electronic device, such as a computer or a
monitor in an operator’s station. Communication can take place locally through a twisted-pair wire, or
remotely via telephone or radio modem.
Operator Interface
If the system needs operator control or interaction. In order to convey information about machine or
process status, or to allow an operator to input data, many applications require operator interfaces.
Traditional operator interfaces include pushbuttons, pilot lights and LED numeric display. Electronic
operator interface devices display messages about machine status in descriptive text, display part count
and track alarms. Also, they can be used for data input.
Physical Environment
The physical environment in which the control system will be located. Consider the environment where
the control system will be located. In harsh environments, house the control system in an appropriate
IP-rated enclosure. Remember to consider accessibility for maintenance, troubleshooting or
reprogramming.
Selection of PLC
The selection of PLC is decided during Finding of Fact; either during design meetings or specs of
customers. Omron is the favored model of PLC that the customer chooses because they are aiming Asia
and Europe.
Speed of PLC
The speed of PLC uses to be a main concern when planning controls but does not truly affect to
controls now. Nowadays PLCs are rapid enough for the majority applications with full programs scan
times usually less than 4 msec. This is the scan time needed for the PLC to seem at the service and
program all the Inputs/Outputs. The Cycle Time is 4 seconds so the majorities PLCs today are glowing
when think this requirement of time.
A lot of PLC has flash cards that can be additional to make bigger memory for Comments and Tags.
The memory of Flash Card is nonvolatile and is really good to store tags and comments. The Ladder
Programs of PLC do not have to be confirmed in order to create changes as the entire program with
comments s and tag can be uploaded to the Personal Computer.
The key factor in selecting a PLC is establishing exactly what the unit is supposed to do. In general it is
not advisable to buy a PLC system that is larger than current needs dictate. However, future conditions
should be anticipated to ensure that the system is the proper size to fill the current and possibly future
requirements of an application.
PLC:
PC:
Computer PLC
In computers, the hardware and software Hardware and software of PLCs are
designed are not much easily designed for easy use by plant
understandable by plant technicians. electricians and technicians. It is
programmed in relay ladder logic.
2|Page
• On-Delay Timer (Ton): When input (IN) goes high, output (Q) will go high only after the
preset time (PT) has elapsed. When input goes low, output will also go low immediately.
• Off-Delay Timer (Toff): When input (IN) becomes high, simultaneously output (Q) becomes
high. When input becomes low, output becomes low after the preset time (PT) is elapsed.
• Pulse Timer (TP): If input (IN) is low, output (Q) is low. When input goes high, output will
remain high till the preset time (PT) & after that it will be reset even if input is high.
• Down Counter (CTD): When input (CD) has the rising edge, counter value (CV) is
decremented by 1. So when the counter value becomes equal to the preset value (PV) which is
zero, output (Q) becomes high. Some initial value is given to Load which is been shifted to CV.
• UP Counter (CTU): When input (CU) has the rising edge, counter value (CV) is incremented
by 1. When CV becomes equal to the preset value (PV) which is loaded with some initial value
except zero, output (Q) becomes high. Reset is used to reset the counter value to zero.
• Up-Down Counter (CTUD): It can act as Up Counter as well as Down Counter. So it can
perform both the functions.
• Input Instruction
i.e.; If a NC switch is actuated then only this instruction will be true. If a NC switch is
actuated then this instruction will not be true and hence output will not be generated.
• Output Instruction
-- ( ) -- This Instruction Shows the States of Output. ie; If any instruction either XIO
or XIC is true then output will be high. Due to high output a 24 volt signal is
generated from PLC processor.
• Rung
Rung is a simple line on which instruction are placed and logics are created
Load
The load instruction is a normally open contact. It is sometimes also called examine on. (as in examine
the input to see if its physically on) The symbol for a load instruction is . This is used when an
input signal is needed to be present for the symbol to turn on. When the physical input is On we can say
that the instruction is True. We examine the input for an on signal. If the input is physically on then the
symbol is on. An on condition is also referred to as a logic(1) state. This symbol normally can be used
for internal inputs, external inputs and external output contacts. Remember that internal relays don't
physically exist. They are simulated(software) relays.
LoadBar
The loadbar instruction is a normally closed contact. It is sometimes also called loadnot or examine off.
(as in examine the input to see if its physically off)The symbol for a loadbar instruction is .
This is used when an input signal does not need to be present for the symbol to turn on. When the
physical input is Off we can say that the instruction is True. We examine the input for an off signal. If
the input is physically off then the symbol is on. An off condition is also referred to as a logic(0) state.
This symbol normally can be used for internal inputs, external inputs and sometimes external output
contacts. Remember again that internal relays don't physically exist. They are simulated(software)
relays. It is the exact opposite of the Load instruction.
*NOTE- With most plc's this instruction(Load or Loadbar) MUST be the first symbol on the left of the
ladder.
0 False True
1 True False
Out
The Out instruction is sometimes also called an OutputEnergize instruction. The output instruction is
like a relay coil. Its symbol looks like this: .When there is a path of True instructions preceding
this on the ladder rung, it will also be True. When the instruction is True it is physically On. We can
think of this instruction as a normally open output. This instruction can be used for internal coils and
external outputs.
Outbar
The Outbar instruction is sometimes also called an OutNot instruction. Some vendors don't have this
instruction. The outbar instruction is like a normally closed relay coil. Its symbol looks like this:
. When there is a path of False instructions preceding this on the ladder rung, it will be True.
When the instruction is True it is physically On. We can think of this instruction as a normally closed
output. This instruction can be used for internal coils and external outputs. It is the exact opposite of the
Out instruction.
0 False True
1 True False
Second Example
Now let's compare a simple ladder diagram with its real world external physically connected relay
circuit and SEE the differences.
In the above circuit, the coil will be energized when there is a closed loop between the + and - terminals
of the battery. We can simulate this same circuit with a ladder diagram. A ladder diagram consists of
individual rungs just like on a real ladder. Each rung must contain one or more inputs and one or more
outputs. The first instruction on a rung must always be an input instruction and the last instruction on a
rung should always be an output (or its equivalent).
Notice in this simple one rung ladder diagram we have recreated the external circuit above with a
ladder diagram. Here we used the Load and Out instructions. Every ladder diagram must include the
END instruction on the last rung. Some PLC's also require an ENDH instruction on the rung after the
END rung.
There are basically two modes of operation for plc processors program mode and variations of run
mode. Number of modes changes with the manufacturer.
There are key switches shown above that allow selecting the modes.
Program Mode:
The mode in which new programs are entered. The program mode also used to edit or update existing
program and used to upload, download files, document program (print out). When the PLC is switched
into the program mode, all outputs from the PLC are forced off regardless of their rung logic status, and
the ladder I/O scan sequence is halted.
Run Mode:
The run mode is used to execute the user program. Input devices are monitored and output devices are
energized accordingly.
After entering all instruction to a PLC program, the processor is put into run mode.
Test Mode:
This feature is often used after developing or editing a program to test the program execution before
allowing the PLC to operate real-world outputs. Without energizing any output a new or modified
program is tested with the inputs.
There are different types of the test mode can include the single-step test mode, which directs the
processor to execute a selected single rung or group of rungs; the single-scan test mode. Which
executes a single processor operating scan or cycle; and the continuous-scan test mode, which directs
the processor to continuously run the program for checking or troubleshooting?
Remote Mode:
The Remote position gives remote access to a PLC to select the program and run mode by a personal
computer connected to the PLC processor. The remote mode may be beneficial when the controller is in
a location that is not easily accessible.
MONITOR Mode
In MONITOR mode the CPU Unit is running. I/O is processed in the same way as in RUN mode. The
operating status of the CPU Unit can be monitored, bits can be force-set/reset, the set values and
present values of timer and counter instructions can be modified, and the present values of word data
can be modified. MONITOR mode is used for system adjustments during trial operation.
During each operating cycle the processor reads all the inputs, takes there values and according to the
user program energizes or de-energizes the output. This process is known is a program scan.
The operation of a PLC is very simple. The processor makes decisions based on a ladder logic program
written by the user. In order to use the program properly, the PLC must communicate with the various
field devices it is tasked with monitoring and controlling. It then compares the actual conditions of the
field devices with what the program instructs them to do, and updates the output devices accordingly.
Operational Sequence
PLCs operate by continually scanning programs and repeat this process many times per second. When a
PLC starts, it runs checks on the hardware and software for faults, also called a self-test. If there are no
problems, then the PLC will start the scan cycle. The scan cycle consists of three steps: input scan,
executing program(s), and output scan.
Input Scan: A simple way of looking at this is the PLC takes a snapshot of the inputs and solves the
logic. The PLC looks at each input card to determine if it is ON or OFF and saves this information in a
data table for use in the next step. This makes the process faster and avoids cases where an input
changes from the start to the end of the program.
Execute Program (or Logic Execution): The PLC executes a program one instruction at a time using
only the memory copy of the inputs the ladder logic program. For example, the program has the first
input as ON. Since the PLC knows which inputs are ON/OFF from the previous step, it will be able to
decide whether the first output should be turned ON.
Output Scan: When the ladder scan completes, the outputs are updated using the temporary values in
memory. The PLC updates the status of the outputs based on which inputs were ON during the first
step and the results of executing a program during the second step. The PLC now restarts the process
by starting a self-check for faults.
Logic Scan
Ladder logic programs are modeled after relay logic. In relay logic, each element in the ladder will
switch as quickly as possible. Program elements can only be examined one at a time in a fixed
sequence. The ladder logic scan begins at the top rung. At the end of the rung, it interprets the top
output first, and then the output branched below it. On the second rung, it solves branches, before
moving along the ladder logic rung.
Q. There are 3 mixing devices on a processing line A,B,C. Afterthe process begin mixer-A is to start
after 7 seconds elapse, next mixer-B is to start 3.6 second after A. Mixer-C is to start 5 seconds after B.
All then remain ON until a master enable switch is turned off. Write PLC ladder diagram, timing
diagram and realize the same.
Sir Notes
Q. Explain functioning and architecture of a programmable logic controller (PLC). List the essential
features of PLC.
The basic architecture of a PLC consists of main components-the processor module, the power supply,
and the I/O modules. The processor module consists of the central processing unit (CPU) and memory.
In addition to a microprocessor, the CPU also contains at least an interface to a programming device
and may contain interfaces to remote I/O and other communication networks. The power supply is
usually a separate module, and the I/O modules are separate from the processor. The types of I/O
modules include discrete (on/off), analog (continuous variable), and special modules like motion
control or high-speed counters. The field devices are connected to the I/O modules.
Depending on the amount of I/O and the particular PLC processor, the I/O modules may be in the same
chassis as the processor and/or in one or more other chassis. Up until the late 1980s, the I/O modules in
a typical PLC system were in chassis separate from the PLC processor. In the more typical present-day
PLC, some of the I/O modules are present in the chassis that contains the processor. Some PLC systems
allow more than one processor in the same chassis. Smaller PLCs are often mounted on a DIN rail. The
smallest PLCs (often called micro-PLCs or nano-PLCs) include the power supply, processor, and all of
the I/Os in one package. Some micro-PLCs contain a built-in operator interface panel. For many micro-
PLCs, the amount of I/O is limited and not expandable.
A simplified block diagram of a PLC shown in above Fig. It has three major units/sections.
I/O (Input/Output) Modules.
CPU (Central Processing Units).
Programmer/Monitor.
The input section converts the field signals supplied by input devices/sensors to logic-level signals
that the PLC's CPU can read. The Processor Section reads these inputs, Processes the signal, and
prepares the output signals. The output section converts the logic level output signals coming from
processor section to high level signals and used to actuate various output field devices. The
programmer/monitor is used to enter the user's program into memory and to monitor the execution of
the program.
1) I/O Section:-
The I/O section establish the interfacing between physical devices in the real world outside the
PLC and the digital arena inside the PLC.
The input module has bank of terminals for physically connecting input devices, like push
buttons, limit switches etc. to a PLC. the role of an input module is to translate signals from input
devices into a form that the PLC's CPU can understand.
The Output module also has bank of terminals that physically connect output devices like
solenoids, motor starters, indicating lamps etc. to a PLC. The role of an output module is to translate
signals from the PLC's CPU into a form that the output device can use.
Conditioning
Isolation
Termination
Indication
An electronic system for connecting I/O modules to remotely located I/O devices can be added if
needed. The actual operating process under PLC Control can be thousands of feet from the CPU and its
I/O modules.
2) CPU Section:-
The Central Processing Unit, the brain of the system is the control portion of the PLC. It has
three Subparts.
Memory System
Processor
Power Supply
Memory System:-
The memory is the area of the CPU in which data and information is stored and retrieved.The total
memory area can be subdivided into the following four Sections.
Data Memory
It is used to store numerical data required in math calculation, bar code data etc.
User Memory
It contains user's application program.
Executive Memory
It is used to store an executive program or system software . An operating system of the PLC is a
special program that controls the action of CPU and consequently the execution of the user's program.
A PLC operating system s designed to scan image memory, interprets the instruction of user's program
stored in main memory, and executes the user's application program the operating system is supplied by
the PLC manufacturer and is permanently held in memory.
Processor:-
The processor, the heart of CPU is the computerized part of the CPU in the form of
Microprocessor / Micro controller chip. It supervises all operation in the system and performs all tasks
necessary to fulfill the PLC function.
It reads the information i.e status of externally connected input devices with input module.
It stores this information in memory for later use.
It carries out mathematical and logic operations as specified in application program.
After solving the user's program, it writes the result values in the memory.
It sends data out to external devices like output module, so as to actuate field hardware.
It performs peripheral and external device communication.
It Performs self diagnostics.
Power Supply:-
The power supply provides power to memory system, processor and I/O Modules.
In its simplest form it can be hand-held device with membrane keypad for program
entry, and a display device (LED or LCD) for viewing program steps of functions.
More advanced systems employ a separate industrial terminal or personal computers
with type-writer type keyboard and CRT monitors. With the help of proprietary software, it allows
programmer to write, view and edit the program and download it into the PLC. It also allows user to
monitor the PLC as it is running the program. With this monitoring systems, such things as internal
coils, registers, timers and other items not visible externally can be monitored to determine proper
operation. Also,internal register data can be altered, if required. to fine tune program operation while
debugging.communication between PM and PLC is done via a cable connected to a special
programming port on PLC. connection to the personal computer can be through a serial port or from a
dedicated card installed in the computer.
PLC control system is that it regards PLC as control key component, utilize special I/O module to form
hardware of control system with a small amount of measurement and peripheral circuit, to realize
control to the whole system through programming.
1. High Reliability
Strong anti-interference quality and very high reliability are the most important features of PLC. In
order to make PLC work stably in strong interferential circumstance. Many techniques are applied in
PLC. Software control instead of relay control mode can decrease faults which are brought about by
original electric contact spot outside working badly. Industrial grade components made by advance
processing technology can resist interferences, and self diagnosis measures of watchdog circuit for
protecting memory can improve performance of PLC greatly.
2. Good Flexibility
There are several programming languages for PLC including ladder diagram, SFC, STL, ST and so on.
If operator can master only one of programming languages, he can operate PLC well. Every who want
to use PLC has a good choice. Based on engineering practice, capacity and function can be expanded
by expanding number of module, so PLC has a good flexibility.
Q. List preventive maintenance tasks that should be carried out on the PLC installation regularly.
Preventive maintenance for the PLC 6 system must be performed in the regular maintenance of the
machine or the equipment. Many control systems operate processes that must be closed for short
periods for product changes. The schedule time depends on the environment, for harsh environment,
the more frequent the maintenance.
Save a copy of your PLC program during routine maintenance to ensure a fairly up-to-date backup. In
the event a PLC becomes inoperable and has to be replaced, this backup file can be downloaded onto a
new PLC.
Check the power and battery LED indicators. If the power LED indicator is off or flickering or if the
battery LED indicator is on or flickering this may be a preliminary sign of a low battery or potential
power issues.
Check temperature, humidity and other environmental factors to make sure that your PLC is operating
within the proper conditions. Also make sure there is good airflow in the cabinet by cleaning filters in
the enclosure.
Check the input voltage that is powering your PLC to make sure that the voltage is within the
appropriate range and free from power spikes or ‘brown out’ conditions.
During routine maintenance, check the functionality to make sure the system or equipment that is being
controlled is operating as intended.
Check the CPU and modules for distorted, warped, or discolored cases and burnt odors.
Do not allow dirt and dust to accumulate on the PLC’s components. The central processing unit and I/O
system are not designed to be dust proof. Check to be sure none of the PLC and module cooling vents
are clogged or blocked by dust or debris. Make sure that there is sufficient heat dissipation space
around the PLC. If heat dissipation is obstructed, circuit malfunction can occur and if conductive dust
reaches the electronic boards, it can cause a short circuit, resulting in possible permanent damage to the
circuit board.
• Check Connections
Make sure that all communication cables, plugs, sockets, terminal strips, wiring and modules are
connected properly. If your PLC system is located in an area that experiences constant vibrations that
could possible loosen terminal connections, perform this check more often and consider installing a
vibration detector.
Check for any product notices, patches and upgrades and update as necessary.
Keep any items such as drawings, installation manuals or other materials away from the PLC system.
Leaving these items on top of the CPU rack or other enclosures can obstruct airflow and create hot
spots, ultimately causing a system malfunction.
Conduct an audit to check each component of your PLC system and determine if parts are good or need
replacement.
Keep a stock of replacement parts on hand to minimize downtime resulting from component failure.
Having the right spare in stock during a failure situation can result in shutdown for only minutes
instead of hours or days.
Any filters that have been installed in enclosures should be cleaned or replaced to ensure that
clear air circulation is present inside the enclosure.
Keep a master copy of operating programs used.
Dust and dirt accumulated in the PLC panel and circuit board should be cleaned. If conductive
dust reaches the electronic boards, a short circuit could result and cause permanent damage to the
circuit board. Ensuring that the enclosure door is kept closed will prevent the rapid buildup of these
contaminants.
Connections to the I/O modules should be checked for tightness to ensure that all plugs, sockets,
terminal strips, and module connections are making connections and that the module is installed
securely. Loose connections may result not only in improper function of the controller but also in
damage to the components of the system.
All field I/O devices should be inspected to ensure that they are adjusted properly.
Circuit cards that deal with process control analogs should be calibrated every 6 months. Other
devices, such as sensors, should receive service monthly.
Heavy noise or heat generating machines and instruments should not place close to the PLC.
Check the state of the battery that supports the RAM memory in the CPU. Most CPUs have a
status indicator that shows whether the battery voltage is sufficient to back up the memory stored in the
PLC. If a battery module is to be replaced, it must be replaced exactly with the same type of battery
module.
PLC Program
For the PLC to be useful, it must first have a Program or Logic for the CPU to execute. A system
engineer or PLC programmer will first create the program logic in a programming device (these days it
is usually software running on a personal computer). This logic can be written in Ladder Logic,
Instruction List, Sequential Function Charts, or any of the IEC languages.
The programmer will then download the program to the PLC. This is usually done by temporarily
connecting the programmer to the PLC. Once the program is installed or downloaded to the CPU – it is
usually not necessary for the PC to remain connected.
Basic Scan
Once the program is in the CPU – the PLC is then set to “run”, and the PLC executes the application
program repeatedly. In addition to executing the program, the CPU regularly reads the status of the
input devices, and sends data to the output devices. The Input system senses the status of the real world
inputs (a switch, a level, etc.), translates them to values that can be used by the CPU, and writes those
values to the Input table. The application program is executed, and writes values to the Output table.
The Output system then converts the output value to a real world change (motor turns on, valve opens,
etc.)
This process of reading inputs, executing logic, and writing outputs is called the PLC Scan or Sweep.
The CPU continuously Reads Inputs, Solves Logic, and Writes to the outputs (there are other tasks the
CPU does – which will be discussed later). It is important to understand the scan because it may dictate
how a programmer structures logic.
Memory
The control program or application program is stored in memory. As the PLC executes logic, it may
also read and store values to memory. The values may also be used and refernced by the application
program.
Q. Develop a Ladder diagram for an alarm system having 04 inputs and 03 outputs with following
operation:
If any two inputs are on, a red light goes on; If any three inputs are on, an siren sounds;
PLC programming language refers to the method by which the user communicates information to PLC.
A Programmable Logic Controller (PLC) is a solid state device designed to perform logic function
previously accomplished by electrochemical relays. Programmable logic controllers are used for the
control and operation of manufacturing process equipment and machinery.