Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

PLC Ladder Examples 2021

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18
At a glance
Powered by AI
The document discusses different PLC program examples to control processes like signal lamps, valves, and sensors. It provides ladder logic diagrams and explanations for tank level control and material mixing in a tank.

PLC programs examples are provided to control a signal lamp, operate a valve, and switch off an output when sensors are activated. AND/OR logic is used to combine inputs and control outputs accordingly.

The PLC program uses level switches to detect the high and low liquid levels. It controls inlet and outlet valves using latching to continuously fill or empty the tank until the opposite level is reached.

PLC Program Examples

Discuss different PLC program examples for Signal lamp task, Valve operation program and
make an output switch off when any of the sensors activated.

PLC Example 1 :

A signal lamp is required to be switched on if a pump is running and the pressure is


satisfactory, or if the lamp test switch is closed.

For the inputs from the pump and the pressure sensors we have an AND logic situation since
both are required if there is to be an output from the lamp. We, however, have an OR logic
situation with the test switch in that it is required to give an output of lamp on regardless of
whether there is a signal from the AND system.

The function block diagram and the ladder diagram are thus of the form shown in Figure
1.37. Note that with the ladder diagram we tell the PLC when it has reached the end of the
program by the use of the END or RET instruction,

PLC Example 2 :

As another example, consider a valve which is to be operated to lift a load when a pump is
running and either the lift switch is operated or a switch operated indicating that the load
has not already been lifted and is at the bottom of its lilt channel.

We have an OR situation for the two switches and an AND situation involving the
two switches and the pump. Figure 1.38 shows a possible program.
PLC Example 3 :

As another example, consider a system where there has to be no output when any one of
four sensors gives an output, otherwise there is to be an output.

One way we could write a program for this is for each sensor to have contacts that are
normally closed so there is an output.

When there is an input to the sensor the contacts open and the output stops. We have an
AND logic situation. Figure 1.39 shows the functional block diagram and the ladder diagram
of a system that might be used.
PLC Example 4 :

Problem Description
One open tank is installed in the plant of which liquid level is to be controlled. When level
reaches the Level Low, Outlet flow is blocked and inlet flow is allowed until high level is
achieved. And when Level High is detected, outlet flow is allowed and inlet flow is blocked.

Problem Diagram
Diagram of a single tank level control

Problem Solution
 To detect high and low level of liquid in the tank, two level switches are used which
gives output in digital terms, that is when corresponding levels are detected, it gives
output high otherwise remain low.
 To control level of this system, Single Acting piston valve can be used which has two
states, either fully open or fully close.
 Low Level Switch is mounted at the bottom of the tank and Level High switch
mounted at the side upper most position.
 When this inputs are detected, output to Control Valve has to be latched in order to
continuously fill or empty the system.
 Master start/stop is also provided to shut down or start the entire process.
PLC Program
Here is PLC program to Control Level of a Single Tank, along with program explanation and
run time test cases.

List of Inputs and Outputs


I:1/0 = Level High Switch (Input)
I:1/1 = Level Low Switch(Input)
O:2/0 = Inlet Valve (Output)
O:2/1 = Outlet Valve (Output)
I:1/14 = Start (Input)
I:1/15 = Stop (Input)
Ladder Diagram to control this process

Program Description
 RUNG000 is simply for latching a coil and master start-stop buttons.
 RUNG001 is to control the outlet valve through O:2/1. This is done when Level High
is detected.
 Latching of Output O:2/1 is done because when High Level is detected, input to
RUNG001 is temporary, like Push Button. So in order to keep outlet valve open until
the Level Low I:1/1 is detected, latching is done. XIO of Level Low Switch is
connected in series so that when Level Low is detected, it goes true closing the
outlet valve.
 Similarly in RUNG002, it works exactly same. The only difference in RUNG002 is that
extra I:1/14 contact in parallel with LLS.
 Suppose when the system is started and the tank is partially filled, neither LHS nor
LLS is detected, in this case, outlet and inlet valves remain closed while inlet valve
should open to start filling the tank because it’s partially filled.
 To eliminate this error, I:1/14 (Start) is connected in parallel to LLS I:1/1 contact. This
checks if LHS (I:1/0) is detected or not. If LHS is not detected, then it opens the inlet
valve until LHS is detected.
PLC Example 5 :

PLC Program for Counting of Parts from Conveyor


This is a PLC Program for Counting of Parts from Conveyor.

Problem Description
Parts are moved on the conveyor. Count the number of parts collected at the end of the
conveyor and display it on the display in PLC using Ladder Diagram programming language.

Problem Diagram

Problem Solution
 Mount Proximity Switch to detect the parts.
 Use output of proximity to counter as an input to increment data.
 Convert this number into appropriate numerical and show number of parts
collected.
 Most widely Inductive and Capacitive Proximity switches are used to detect parts.
 Inductive Proximity are used to detect metal objects while to detect other objects,
Capacitive Proximity Switch is most widely used.
 Capacitive Proximity detection capability ranges from 1 to 25mm distance.
 Mount this sensor according to the size of parts present on the conveyor and width
of conveyor so that this sensor can detect parts easily.
 CUP is used to increment the number of parts collected.
PLC Program
Here is PLC program for Counting of Parts from Conveyor, along with program explanation
and run time test cases.

List of Inputs and Outputs


I:1/0 = Start (Input)
I:1/1 = Stop (Input)
I:1/5 = Proximity (Part detection) (Input)
C5:0 = Counter Up (Counter)
O:6 = Display address (Output)
TOD = Hexadecimal to BCD conversion instruction (Compute)
B3:0/0 = Latching Bit (Bit)
Ladder Diagram to count and display number of parts

Program Description
 RUNG000 is the master start/stop rung used to start and stop the counting process.
 RUNG001 is to count the number parts collected. Counter Up with address C5:0 is to
count the number of parts collected. Whenever a part is detected by Proximity
Switch, I:1/5 goes true momentarily and it increments accumulator value of the
counter.
 RUNG002 is used to convert Decimal numbers into Binary Coded Decimal. Source
address is given as C5:0.ACC and destination address is given as O:6 which is of
Display. Converted BCD number is decoded by the display and the value present in
accumulator of CUP C5:0 is displayed.
PLC Example 6 :

This is a PLC Program to Count and Pack Parts from Conveyor.

Problem Description
Objects are moving on a conveyor belt 1. When an empty box is detected, conveyor belt
starts and 5pcs are packed in a box. When box is filled, it is carried to the storage area via
conveyor belt 2. Implement automation of this process in PLC using Ladder Diagram
programming language.

Problem Diagram

Problem Solution
 Use proximity switches to detect moving objects on the conveyor belt 1 and to
detect an empty box on conveyor belt 2.
 Use counter to count number of objects to be packed.
 Use timer such that when 5pcs are detected, conveyor runs for a while and stops
when 5th object is finally collected in the box. Assume time by calculating conveyor
belt speed.
 When number of parts to be packed are detected timer is activated. When timer is
over, it stops the conveyor until next empty box is detected.
 Assuming time taken by the last 5th object is 2secs to be collected.
PLC Program
Here is PLC program to Count and Pack Parts from Conveyor, along with program
explanation and run time test cases.

List of Inputs and Outputs


I:1/14 = Start (Input)
I:1/15 = Stop (Input)
B3:0/0 = Latching Bit (Bit)
B3:0/1 = Latching Motor 1 bit (Bit)
I:1/0 = Part detection (Input)
I:1:1 = Box detection (Input)
O:2/0 = Conveyor Belt 1 (Output)
O:2/1 = Conveyo2 Belt 2 (Output)
C5:0 = Part counter (Counter)
T4:0 = Timer to stop conveyor (Timer)
Ladder Diagram to count and pack parts

Program Description
 RUNG000 is for master start and stop the process.
 RUNG001 is for controlling Conveyor Belt 1 motor M1 which is operated by Box
Detection proximity switch. When the process is started and empty box is detected
by Proximity having address of I:1/1, power supply to the motor of Conveyor Belt 1 is
given. This drives the Motor M1 moving objects on the conveyor belt 1.
 Every time a part is detected by the I:1/1 Part detector, Counter C5:0 is incremented
by 1. Counter has a preset value of 6. Here that means when total 5 parts are
detected, counter done bit C5:0/DN is set to 1.
 When C5:0/DN bit is set, timer T4:0 is activated for 2secs which is an assumption
that the part will take approximately 2secs to fall into the box after it is detected by
the Pat Detector proximity switch I:1/0.
 Counter is immediately reset when C5:0/DN goes true. So one shot is generated by
C5:0/DN bit. It latches the Latching Motor1 bit before it goes false.
 Conveyor Belt 2 motor M2 (O:2/1) is operated when counter value reaches to 6 that
is when total 5 parts are detected. And it is stopped when an empty box is detected
again.
 And the process is repeated.
 Important thing to note here is that Counter Preset is set 6 that is because when the
counter is reset, the value is the accumulator is set to 1 because of latching bit.
PLC Example 7 :

PLC Program to Operate 4 Outputs Simultaneously with Time Delay


This is a PLC Program to Operate 4 Outputs Simultaneously with Time Delay.

Problem Description
There are total four number of outputs which should be run one by one with a particular
time delay. Implement this in PLC using Ladder Diagram programming language.

Problem Solution
 Generate Master Start and Stop buttons to activate the sequence and define four
outputs.
 Use TON timer to generate a particular time delay, same or different.
 Use Done bit of first timer to energize other output and activate second timer.
 Repeat this process until the final output is energized and last timer is activated.
 Reset timers after the completion of first cycle if necessary.
 Use LEDs as output to test the program.
PLC Program
Here is PLC program to Operate 4 Outputs Simultaneously with Time Delay, along with
program explanation and run time test cases.

List of Inputs and Outputs


I:1/0 = Master Start (Input)
I:1/1 = Master Stop (Input)
O:2/4 = Master Coil (Output)
O:2/0 = Output0 (Output)
T4:0 = Output0 Timer (Timer)
O:2/1 = Output1 (Output)
T4:1 = Output1 Timer (Timer)
O:2/2 = Output2 (Output)
T4:2 = Output2 Timer (Timer)
O:2/3 = Output3 (Output)
T4:2 = Output3 Timer (Timer)
Ladder Diagram to solve this problem
Program Description
 RUNG000 again here is to create Master Start and Stop coil with address O:2/4.
<="" li="">
 RUNG002 comprises Timer0 T4:0 with 15secs of Time Delay which is used to de-
energize O:2/0 output0 after 15secs.
 When Master Start I:1/0 is momentarily pressed, output master coil O:4/4 is latched
energizing the Output0 O:4/0 and activating Timer0.
 When Timer counts upto 15secs, Timer Done bit goes high turning off the Output0
and energizing Output1 O:2/1.
 This process gets repeated till the end.
 All the timers have the same preset value here so all the outputs remain ON for
15secs.
 To repeat this entire system again automatically, all the timers must be reset when
Timer3 is done counting and generates T4:3/DN bit as shown in diagram below
(RUNG009 of main program).
PLC Example 8 :

PLC Program to Remove Empty Detected Bottle on Conveyor


This is a PLC Program to Remove Empty Detected Bottle on Conveyor.

Problem Description
After filling process, bottles are moved on the conveyor belt for packing process. Detect if
any empty bottle is left on the conveyor and remove it from the conveyor. Implement
automation of this in PLC using Ladder Diagram programming language.

Problem Diagram

Problem Solution
 Proximity sensors are used to detect bottles.
 One proximity is calibrated such that it detects all the bottles passing on the
conveyor. And other proximity is used such that it detects only empty bottle.
 Use Bit Shift Register to shift a bit which is set when an empty bottle is detected.
 Use a piston or blower is used to throw an empty bottle out of the conveyor.
PLC Program
Here is PLC program to Remove Empty Detected Bottle on Conveyor, along with program
explanation and run time test cases.
List of Inputs and Outputs
I:1/0 = Start (Input)
I:1/1 = Stop (Input)
I:1/2 = Bottle Proximity (Input)
I:1/3 = Empty bottle proximity (Input)
O:2/0 = Master coil / Run (Output)
O:2/1 = Conveyor motor (Output)
O:2/2 = Blower (Output)
BSL = Bit shift left instruction (Logical)
B3:0 = Bit shift Register (Register)
B3:0/3 = Bit to energize capping machine (Bit)
R6:0 = Control register (Register)
Ladder diagram to accomplish removing of empty bottle

Program Description
 When the system is started, conveyor motor coil with address O:2/1 is energized.
 RUNG002 and RUNG003 are used to operate bit shift register and Blower with
address O:2/2.
 Whenever conveyor motor is in RUN mode, empty bottles detected by the proximity
sensor with input I:1/3, it sets B3:0/0 bit and is shifted left every time a bottle is
detected by bottle proximity with address I:1/2.
 From proximity to blower, distance is 4 steps. Hence bit B3:0/3 of B3:0 register is
used to operate blower.
 When B3:3/0 bit is set that is when empty bottle is detected by input I:1/3, after 4
steps, blower is activated and the empty bottle is removed.
PLC Example 9:

PLC Program to Control Mixing in a Tank


This is a PLC Program to Control Mixing in a Tank.

Problem Description
Material A and Material B are collected in a tank. These materials are mixed for a while.
Mixed product is then drained out through Outlet valve. Implement this in PLC using Ladder
Logic programming language.

Problem Diagram
Diagram of a mixing tank

Problem Solution
 To detect level of Material A and Material B, two separate level switches are used.
 And to detect low level, one more level switch is used at the bottom of the tank.
 These give output in digital terms that is when corresponding levels are detected.
 To control level of this system, Single Acting Piston valve can be used which has two
states, either fully open or fully close.
 To control mixing, agitator is used which is connected with Motor shaft.
 Particular time delay is generate to mix the materials for a definite time.
 Control inlet valves on the basis of Level Material switches A and B.
 Outlet valve is then operated to drain the mixed product.
PLC Program
Here is PLC program to Control Mixing in a Tank, along with program explanation and run
time test cases.

List of Inputs and Outputs


I:1/14 = Start (Input)
I:1/15 = Stop (Input)
B3:0/0 = Master Coil Bit (Bit)
I:1/0 = Level of Material B (Input)
I:1/1 = Level of Material A (Input)
I:1/2 = Low Level Switch (detects empty tank) (Input)
O:2/0 = Inlet Valve 1 (Material A Feed) (Output)
O:2/1 = Inlet Valve 2 (Material B Feed) (Output)
O:2/2 = Agitator Motor (Mixing) (Output)
O:2/3 = Outlet Valve (Product Outlet) (Output)
T4:0 = Time to mix Materials (Timer)
Ladder Diagram to control mixing in the tank

advertisement

Program Description
 RUNG000 contain master start/stop with address of Start PB I:1/14 and Stop PB
I:1/15.
 RUNG001 is to operate Inlet Valve of Material A with address O:2/0. It is operated
when Low Level of the tank is detected by Level Low Switch I:1/2. And it is closed
when Level Material A is detected by a switch with address I:1/1. Start PB is also
connected in parallel with the LLS, it is done so that when LLS or level of Material A is
not detected, Inlet Valve is operated by Start PB.
 RUNG002 is to operate Inlet Valve of Material B with address O:2/1. It is opened
when Material A is filled to its desired level (Level Material A). In other words, Valve
of Material B is opened when Level of Material A is detected by I:1/1 and it is closed
when Level of Material B is detected or Tank is full.
 RUNG003 & RUNG004 operates Agitator Motor with address O:2/2. When the tank
is full with Material A and B, Level High (Level Material B) is detected. This detection
energizes O:2/2 and enables ON timer with address T4:0. Agitator Motor is
connected to the address O:2/2. So when O:2/2 energizes, Motor Agitator starts the
mixing process and mixes Material A and B for 20secs which is a preset of Timer ON.
When Pre = Acc, T4;0/DN bit goes high turning off the agitator motor.
 RUNG005 is for Outlet Valve with address O:2/3. It is operated when the entire
mixing process is completed that is when Pre= Acc = 20secs. And this is closed when
LLS is again detected.
 Timer On is set to auto reset mode.

You might also like