PLC Ladder Progrmming
PLC Ladder Progrmming
Figure Motor stop/start relay ladder schematic Figure Motor stop/start ladder logic program.
Lights and Switches
Program examples
Q. Draw ladder diagram for
a. When START push button is pressed, the output is energized
b. When push button gets released, the output still remains ON till STOP button is
pressed
Ladder Diagram:
• Input : Start (PB1)
Stop (PB1)
• Output: Coil Q1
Program examples
• Draw ladder diagram for
a. When push button ON After 5 sec motor M1 starts
b. After 5 sec, motor M2 starts and M1 stop.
Ladder Diagram:
Input: Start
Stop
Output: Motor M1
Motor M2
Flag bit: M1
Timer: T1(5sec)
T2(10sec)
Example of Process:
• Principles of Operation
• To get an idea of how a PLC operates, consider the simple process
control problem illustrated in Figure 1-17 . Here a mixer motor is to
be used to automatically stir the liquid in a vat when the temperature
and pressure reach preset values. In addition, 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.
Fig Mixer process control problem. Figure Process control relay ladder diagram.
Figure 1-19 Typical wiring connections for a 120 VAC Figure 1-20 Typical wiring connections for a 120 VAC
modular configured input module. modular confi gured output module.
Source: Photo courtesy Automation Direct, Source: Photo courtesy Automation Direct,
www.automationdirect.com. www.automationdirect.com.
PLC Operation
• I/O Scan Mode During the I/O scan mode, the processor updates all outputs and inputs the state of all
inputs one channel at a time. The time required for this depends on the speed of the processor.
• Execution Mode During this mode, the processor evaluates each rung of the ladder diagram program that is
being executed sequentially, starting from the first rung and proceeding to the last rung.
• Scan Time An important characteristic of the programmable controller is how much time is required for one
complete cycle of I/O scan and execution. Of course, this depends on how many input and output channels
are involved and on the length of the ladder diagram program. A typical maximum scan/execution time is 5
to 20 ms
• The length of time for one scan consists of three parts: (1) input time, (2) execution time, and (3) output
time
• The scan time may have an impact on the ability of the PLC to detect events that
occur on the inputs. For example, if some limit switch goes to the ON state for
less than a scan time, it may be missed by the PLC. The high speed of modern
PLCs makes this less of a problem than in the old days
PLC ladder programming
Areas where programmable logic controllers
are applied
• PLCs are used in various applications in industries such as the steel industry,
automobile industry, chemical industry and the energy sector. The scope of PLCs
dramatically increases based on the development of all the various technologies
where it is applied.
• A conveyor belt
• Paper industry
• Cement manufacturing
• A lift
• A robot control system
• Liquid level monitoring
42
Exercise
1. Draw a ladder for following logic gates and verify it
NOT, OR, AND, NAND, NOR, XOR
2. Develop ladder diagram to realize 4:1 Mux
3. Draw a ladder for
a. When Start Push Button (PB) is pressed, the output is energized.
b. When PB is released, the output still remains ON till STOP button is pressed.
4. Draw the ladder for
a. When Push Button(PB) ON, Motor M1 starts for 5sec
b. After 5sec, Motor M2 starts for 5sec and M1 stop
5. Develop ladder for conveyer & bottle filling station having following sequence
a. Start the sequence
b. After start motor rotates
c. Motor stops as soon as bottle detects
d. Valve opens for 5 second and closes
e. After closing valve motor starts
43
6. Develop Ladder following sequence(Considering Four Inputs)
a. Any One INPUT ON: Green Light ON
b. Any two INPUT ON: Red Light ON, Green Light Off
c. Any Three INPUT ON: Alarm ON, Green and Red Light Off
d. Any Four INPUT ON: Fire ON, Green and Red Light Off, Alarm OFF
12/30/2020 44
Implementation of Ladder programming for Bottle Filling Plant:
Problem Definition:
Draw a ladder diagram for bottle filling plant with following specifications.
1. The objective of the process is to fill bottles moving on a conveyor.
2. In the Initialization phase the tank is prefilled using level control system, till set point is reached
using sensors like timers.
3. In the running phase, start the bottle conveyor and check bottle position.
4. Fill the bottle using level control system, then close output valve stop level control system and
again go to the running phase.
5. Construct a narrative statement outline of the event sequence for the bottle filling system shown
in Figure . The objective is to fill bottles moving on a conveyor.
6. Construct the ladder diagram that will provide a solution to the discrete state control problem
defined by in Figure.
45
12/30/2020 46
Solution: Process Flow (Event Sequence of the System): Assume that when the level control system is a
command is given to stop the continuous control system, the input valve is driven to the closed position and
then the sequence would be
I) Initialization (Prefill of tank)
a) Conveyor stopped output valve is closed
b) Start level control system
1 Operate for a sufficient time (one minute) to reach set-point.
2 Add another sensor so that the system knows when set-point is reached
3 Here timer is used.
c) When level is reached stop level control
d) Go to running phase
II) Running Phase
a) Start bottle conveyor
b) When bottle is in position
1 Stop the conveyor
2 Open the output valve
3 Turn on level-control system to keep the level constant during bottle fill
c) When the bottle is full
1 Close the output valve
2 Stop the level-control system
12/30/2020 47
d) Go to step II (a) and repeat.
Ladder Diagram for Bottle Filling
Plant:
12/30/2020 48
Ladder Description:
1. Rung-1 is used START /STOP latch is provided to define the initial start-up of the system.
2. Rung-2 is used for initialization, is accomplished by a 60-sec timer that turns on the level-
control system for the 1-min following the start button. In is never energized again during
running.
3. Rung-3 drives the conveyor motor until a bottle is in position, as indicated by the bottle
position switch opening.
5. Rung-5 & Rung-6 are used for the contacts of CR2 turns on both, the solenoid valve and
the level-control system .Note the timer in Rung-6 for initialization.
6. Rung-7 is necessary to detect that the bottle is full and to start the conveyor until the
bottle is moved out of position and the bottle-present switch is opened. Continuous running
now occurs between rung 3 and rung 7.
12/30/2020 49
References:
1. Programmable Logic Controllers, Fourth Edition ,W. Bolton
2. PROGRAMMABLE LOGIC CONTROLLERS Fourth Edition, Frank D. Petruzella
3. Process Control Instrumentation Technology, Eighth Edition ,Curtis D. Johnson
12/30/2020 50
END