Module 34
Programmable logic controller
Introduction to PLC
Any computer having input and output interfaces can be used to control external devices.
Input / Output devices of general-purpose microcomputers are not engineered to handle line-
voltages and currents above transistor-transistor logic (TTL) levels. Also they are not
designed to with-stand the temperature, humidity, and vibration on shop floors. These
drawbacks of a general purpose computer have been rectified by developing a Programmable
Logic Controller (PLC) with built-in isolation into their inputs and outputs.
“The programmable logic controller is defined as a digital electronic device that uses a
programmable memory to store instructions and to implement functions such as logic,
sequencing, timing, counting and arithmetic words to control machines and processes.”
PLCs are generally used for incorporating automation in open loop systems where processes
are to be performed in a sequential manner. PLCs are used for automation of assembly lines
in industries. They are generally designed for multiple input multiple output (MIMO)
systems. In PLCs, instructions are saved in nonvolatile memory.
Some of the advantages of PLCs are:
• Cost effective
• Flexibility and ability to use similar system for other processes
• Programming interface is easier in comparison to other processers
• Resistant to impact and vibration
• Resistant towards electrical and mechanical noise
• Ability to work at high temperatures
Basic structures
Fig 1: Block diagram of a PLC
Figure shows the basic elements of a PLC. It is basically a microprocessor based control
system. Microprocessor communicates with the outside world with input/output drives via a
circuitry. This circuitry protects the microprocessor and other elements of PLC from the high
voltages and currents coming to the PLC. Microprocessor does its basic functions of taking
decisions according to the instructions written in the programs which are stored in the
memory. PLC scans a set of sensor inputs rapidly and repeatedly. Then it evaluates their logic
relationships to defined outputs according to a logic program. At last it sets the outputs
according to the programmed logic.
Principle of operation
PLCs are programmed through concept of ladder logic. In general, there exists a graphical
user interface (GUI) to program a PLC that makes it different from other processers. Ladder
logic comprises of two columns. Left column shows input devices like switches, sensors
while in output column is at right side which shows actuators like cylinders, motors.
Meanings of symbols used in PLC Program:
][
This instruction is called as “examine on” or “normally opened” as input functions or storage
bits. If the corresponding memory bit is a “1” then the respective ‘rung’ will continuously be
executed and the corresponding outputs will be energized. Rung is one of the multiple
horizontal programming lines in a ladder logic diagram.
If the corresponding bit is “0” then the rung will not be executed continuously and outputs
will be de-energized. If this instruction is used as input bit, its status should be according to
the status of the real world input devices connected to the input table by identical addresses.
Addressing Sample: I: 3/1
This indicates address of a sample. I indicate input image table, 3 indicates slot no. 3 of input
port and 1 indicates bit three of 3rd slot of input port.
]/[
This instruction is called “examine off” or “normally closed” as input functions or storage
bits. If the corresponding memory bit is a “1” then the respective ‘rung’ will continuously be
executed and the corresponding outputs will be energized.
If the corresponding bit is “0” this instruction will not allow rung continuously and outputs
will be energized. If used as input bit, its status should correspond to the status of the real
world input devices tied to the input table by identical addresses.
This is called as ‘output energize’. This instruction sets the specified bit when rung continuity
is achieved. Under normal operating conditions, if the set bit corresponds to an output device,
output device will be energized when rung goes true.
Addressing Example O:3/1
O -- output image table
3 -- slot three
1 -- bit one of slot three
This is called as ‘output latch’. This instruction functions similar to output energize except
that once a bit is set with OTL, it is latched on. Once an OTL bit has been set ON (1 on the
memory) it will remain ON even if the rung condition goes false. The bit must be reset.
(U)
This is called as ‘output unlatch’. This is used to unlatch (reset) a latched bit. Its address
must be same as latched one.
Timer
This is also called as “TON”. Figure 2 shows the schematic of a Timer. It is used to turn an
output ON or OFF after the timer has been ON for preset time interval. This output
instruction begins timing when rung goes true. It waits the specified amount of time (As
specified in Preset), keeps track of accumulated intervals which have occurred (ACCUM),
and sets DN (Done) bit when ACCUM time equals preset time.
As long as rung condition remains true, Timer adjusts its accumulated value to each
evaluation until it reaches the preset value. The accumulated value is reset when rung
condition go false, regardless of whether timer has timed out.” TIME BASE” is an amount of
time after which accumulator increases its value by 1.
Fig 2: Schematic of a Timer
Programming and concept of ladder diagram
In this segment, we will see how PLCs are incorporated to control various activities in an
industry. In this illustration we have a conveyer belt run with two motors at its ends, three
different stations to perform various activities like painting of vehicle body or fitting of any
component in chassis etc. along with two switches to run conveyer. Figure 3 shows the
photograph of a conveyor belt system. The PLC is of “Bull 1764 Micrologix 1500 LSP Series
C” which can be controlled by a Graphical User Interface “RS Logic 500 Starter”.
Fig 3: PLC controlled conveyor belt system
To run the conveyer belt with the help of switches
PLCs are controlled through Ladder Logic. In input section of the ladder, name of the input
device must be mentioned on the top of symbol, followed by primary input port. Secondary
input port is mentioned just below symbol. In similar way, output symbol should be
mentioned with name and output ports as shown in figure
Fig 4(a): A rung to run the conveyor belt.
To control movement of pneumatic devices in an industry with PLC
Figure shows a program code to control the motion of pneumatic cylinder with a switch.
Fig 4(b): Program code to actuate a pneumatic cylinder
Concepts of latching
Fig 5: Program code to make use of sensors and actuators
In industrial applications, it is required to use various sensors to control the operations of
systems and processes using PLCs. Figure 5 shows a typical program to operate an electric
motor and a pneumatic cylinder with the help of some sensors such pneumatic proximity
switch.
To control a mechatronics system, we need to combine various mechanical and electrical
input and output devices and to operate them in a sequential manner. Consider a prototype of
industrial assembly line with 3 stations as shown in Figure 3.
At first station ST1, the sensor identifies an object (finished product) on the conveyer belt and
sends a signal to the controller. Controller processes this information and actuates the electric
motor to run the conveyer belt.
Second Station ST2: It is allotted for the inspection of the finished product or object. At ST2,
conveyer belt stops. In case any fault diagnosed by the inspection system, the product will be
taken away by the pneumatic actuators placed at Station 3, ST3.
Selection criteria for 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 identifies a specific type of device.
* The need for special operations in addition to discrete (On/Off) logic.
* List the advanced functions required beside simple discrete 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
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
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 push buttons, 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 considers 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
PLC Control Applications in Industrial Automation
1. Introduction to PLC Control
A Programmable Logic Controller (PLC) is an industrial computer used to control
electromechanical processes. PLCs are widely used in automation due to their reliability,
flexibility, and ease of programming.
Key Components of a PLC System:
- Input Devices (Sensors, Switches)
- Output Devices (Actuators, Motors, Valves)
- CPU (Central Processing Unit)– Executes the control logic.
- Memory – Stores the program and data.
- Power Supply – Provides power to the PLC.
- Communication Interface – For HMI (Human-Machine Interface) and networking.
2. PLC Control Applications
2.1 Extending and Retracting a Pneumatic Piston Using Latches
- Objective: Control a single pneumatic piston (cylinder) to extend and retract using a
latching circuit.
- Components Required
- PLC with digital I/O
- Solenoid valve (5/2-way or 3/2-way)
- Pneumatic piston
- Push buttons (Start/Stop)
- Working Principle:
- When the Start button is pressed, the PLC energizes the solenoid, extending the piston.
- A latch circuit keeps the piston extended until the Stop button is pressed.
- The solenoid is de-energized, retracting the piston.
- Ladder Logic Example:
` ``
2.2 Control of Two Pneumatic Pistons (Sequential or Simultaneous)
- Objective: Control two pistons in sequence or simultaneously.
- Modes of Operation:
1. **Sequential Control:
- Piston 1 extends → Piston 2 extends → Both retract.
2. Simultaneous Control:
- Both pistons extend and retract together.
- Ladder Logic Example (Sequential):
2.3 Control of Process Motor (Start/Stop with Overload Protection)
- Objective: Start and stop a motor with overload protection.
- Components:
- PLC with relay output
- Contactor (for motor switching)
- Overload relay (for protection)
- Ladder Logic Example:
2.4 Control of Vibrating Machine (Pulse Control)
- Objective: Control a vibrating machine with ON/OFF cycles.
- Method:
- Use a timer (TON/TOF)to create pulses (e.g., 5 sec ON, 3 sec OFF).
- Ladder Logic Example:
2.5 Control of Process Tank (Level Control)
- Objective: Maintain liquid level in a tank using sensors.
- Components:
- Float switches (Low-level & High-level sensors)
- Inlet valve (controlled by PLC)
- Drain valve (optional)
- Working:
- If Low-level detected, open inlet valve.
- If High-level detected, close inlet valve.
- Ladder Logic Example:
2.6 Control of Conveyor Motor (Start/Stop with Sensors)
- Objective: Automate a conveyor belt with object detection.
- Components:
- Proximity sensor (to detect objects)
- Motor contactor (to run the conveyor)
- Working:
- When an object is detected, the conveyor runs for a set time.
- Ladder Logic Example:
3. Safety Considerations in PLC Control
- Always include emergency stop (E-stop) circuits.
- Use interlocks to prevent accidental operations.
- Implement overload protection for motors.
- Follow lockout-tagout (LOTO) procedures during maintenance.