50% found this document useful (2 votes)
998 views105 pages

PLC Examples

The document provides solutions to 10 PLC programming problems involving tasks like controlling an automatic car wash process, operating outputs with time delays, driving motors simultaneously and in different directions, controlling lights in sequences using timers and bit shift registers, performing mathematical functions, generating outputs based on equations, jumping between processes, and performing pulse width modulation.

Uploaded by

techknow leader
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
50% found this document useful (2 votes)
998 views105 pages

PLC Examples

The document provides solutions to 10 PLC programming problems involving tasks like controlling an automatic car wash process, operating outputs with time delays, driving motors simultaneously and in different directions, controlling lights in sequences using timers and bit shift registers, performing mathematical functions, generating outputs based on equations, jumping between processes, and performing pulse width modulation.

Uploaded by

techknow leader
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 105

1.

PLC Program to Implement an Automatic Car-Wash


Process

Problem Description
When a Car enters the hall, a certain sequence is to be followed
automatically.
Steps are,
1) Soaping,
2) Washing,
3) Rinsing and 4) Drying.
Implement this process sequence in PLC using Ladder Diagram programming
language.
Problem Solution
• To detect the car automatically, load cells can be used, or any
other sensor such as Infrared Sensor can also be used.
• Soaping, Washing, Rinsing and Drying are performed for a
particular time, hence to generate time delay for these outputs
become mandatory.
• To operate this process, for soaping, washing, and drying, four
different timers are used.
• IR sensor detects everything whatever restricts the signal but in
load cell, particular Low Level and High Level can be set to detect
heavily weighted cars only. Load Cell can be here more effective
here than IR sensors.
2. 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.
3.PLC Program to Drive Motors Simultaneously with Interlocking

• Problem Description
• Two Motors are running in a sequence one by one for a
particular time.
• If the start button is pressed Motors run in sequence such that
1st Motor stays ON for 5secs and then 2nd Motor is turned ON
and stays ON for 5secs.
• And the cycle is repeated until it is interrupted. While motors
are running in the sequence, if one motor is running and the
button of other motor is pressed, then the running Motor
should stop and the other motor should run.
• Implement this logic in PLC using Ladder Diagram programming
language.
• Problem Solution
• Define addresses of motors.
• Create latching seal in contact to start and stop the sequential
operation.
• Use TON timer to generate a particular time delay, same or
different.
• Use DN bit of first timer to energize 2nd motor coil and
activate second timer.
• No need to use Reset coils, program will reset the timers itself
after completion of each cycles.
• Use Parallel Start Motor contact to start one motor when other
motor is running.
4.PLC Program to Drive Motor in Forward and Reverse
Direction

• Problem Description
• A motor is connected to PLC. Run this
motor in the Forward and Reverse
direction using Ladder Diagram
programming language.
• Problem Solution
• For any three-phase AC motor, reversing can be accomplished by reversing any
two leads. For single-phase motor, reversing start lead with respect to the main
leads. And for DC motor, reversing the field leads with respect to the armature
leads.
• There are certain ways to reverse the motor. One is to use DPDT (Double Poles,
Double Throw) switch and another one is by using Reversing Contactors.
• DPDT switch is best suitable for reversing a small DC motors while Reversing
Contactor is used to reverse Three-Phase AC motors.
• Single-phase motors are not widely used for reversing operation. In fact, these are
not even available widely with reversing capability.
• As here we have a three-phase AC motor, reversing any two leads will drive the
motor in reverse direction.
• Contactor is an electrical switch used for switching an electrical power circuit.
• Two magnetic contactors are used, one for forward connections and the other for
reverse connections.
• Only Push Button switches are used to control the direction of this
three-phase AC motor.
• We have the input commands to these Push Button switches which
are then internally processed by PLC and then there is the output
terminal which activates the corresponding relay to energize the
relevant magnetic contactors.
• Configure forward and reverse wiring of the motor with contactors
such that forward contactor is connected directly in the normal direct
phasing of the motor terminal and reverse contactor is connected with
two of the motor terminals in the opposite phase.
• When it is switched to reverse direction, forward rotation does not
stop instantaneously hence we have to determine what time it takes
to completely stop one particular direction. Then provide time delay of
a second or two and activate the other contactor.
5.PLC Program to Control Lights in a Sequence (1)

• Problem Description
• Implement controlling of various lights in
PLC using Ladder Diagram programming
language using timers. Retentive Timer is
suggested to use.
• Problem Solution
• Define order of lights.
• Provide timers to lights, to each individually if necessary.
• Reset timers automatically or use reset coil to reset timers.
• Double check if the order of light is made correctly and connections are made
properly.
• Use latching coil for Master Start and Stop for prevention against
malfunctioning.
• 0.1 Time Base function availability is useful to turn ON and OFF a light.
• By using this, we can make lights blink.
• This is one method to solve this problem by using timers.
• Retentive Timers have a capability of storing the previous values at which timer
was stopped or input was withdrawn.
• Hence Retentive Timer RTO can be used here so that in case of power failure,
program can be restarted from where it was left previously.
6.PLC Program to Control Lights in a Sequence (2)

• Problem Description
• Implement controlling of various lights in
PLC using Ladder Diagram programming
language using Bit Shift Registers.
• Problem Solution
• Define order of lights.
• Use Bit Shift Registers to implement any sequence of lights.
• Double check if the order of light is made correctly and connections are made
properly.
• Use latching coil for Master Start and Stop for prevention against
malfunctioning.
• 0.1 Time Base function availability is useful to shift register bits very quickly.
• By using this, we can make lights blink.
• Check if bit addresses provided to Light output addresses are correctly chosen
or not.
• Provide 16bit of length to Bit Shift Register, by adding this total 16 number of
lights can be controlled.
• This limitation can be overcome by using more than one registers or with same
length, more than one shift registers.
7.pLC Program to do Mathematical Functions

• Problem Description
• Implement various mathematical functions
in PLC using Ladder Diagram
programming language.
• Problem Solution
• Use all the Math Instructions to implement various
Mathematical Arithmetic Functions.
• Use ADD to add one piece of data to another.
• Use SUB to subtract one piece of data from another.
• Use MUL to multiply one piece of data by another.
• Use DIV to divide one piece of data by another.
• Use SQR to find the square root of a piece of data.
• Use NEG to change the sign of a piece of data.
8. PLC Program to Generate Outputs Based on Equations

• Problem Description
• The following calculation will be made when
input I:1/0 is true.
• x=2^y √(2+Sin y)
• If the result x is between 1 and 10 then the
Output 0 will be turned on. The value of x
will be output as an Analog voltage. Perform
this operation in PLC using Ladder Diagram
programming language.
• Problem Solution
• Perform tasks individually as defined below.
• Assign integer number addresses to store the 16/32bit data into
registers.
• Use this addresses in the mathematical instructions as Source and
Destination.
• Use XPY (X to power Y) instruction to find the input 2y.
• Use SIN instruction to find Sin y. Add this with 1 by using ADD
instruction.
• Square Root this 1 + Sin y by using SQR instruction and multiply
the output of XPY and SQR.
• Compare this data with the lower and upper limit and control output.
9. PLC Program to Jump to Other Process

• Problem Description
• Implement Jumping from one process to
another process in PLC using Ladder
Diagram programing language.
• Problem Solution
• This type of operation is most widely used in hazardous
area where some action must be taken immediately
despite of the status of currently running process.
• Use JMP instruction to perform this task.
• This Jump instruction does not differ from any
Microcontroller Jump instruction, this Jump instruction
also must be used with LBL (Label) instruction.
• Simply explaining, when JMP is activated, all the outputs
between JMP and LBL are disabled until this is active. By
saying ‘all outputs’, it does not include latch –(L)– outputs
10. PLC Program to Perform Pulse Width Modulation

• Problem Description
• Implement Pulse Width Modulation in PLC
using Ladder Diagram programming
language
• Problem Solution
• To perform this two timers are used to Turn ON and OFF an output according to the
length of a pulse.
• Timer preset value should vary such that when preset of one timer is increased,
preset value of other timer should decrease in order to maintain Turn ON and OFF
time of output.
• Select input bits such that we can directly enter digits and place it into Preset value
of a timer.
• This can be done by using a digital input device which generates 0-9 numerical
digits.
• Output of this Digital device is always in BCD form and Timers preset values store
data in Hexadecimal, so whichever data are sent to preset register of a time, it has
to be converted into Hexadecimal form.
• FRD instruction can be used to perform BCD to Hex conversion.
• Output of this conversion is directly moved to preset register of timer which can be
performed by MOV instruction.
11.Plc Program to Call a Subroutine for a Different Process

• Problem Description
• Add temperature outputs of two
temperature transmitters and display the
total temperature. Update display every 10
seconds when this system is active using
Subroutine program
• Problem Solution
• Using subroutine has an advantage that process is not
affected by any other data in subroutine program unless and
until the subroutine is called.
• This is very useful in displaying various data on the same
display with a particular time delay.
• For example, we can use the same display to show
Pressure readings for the first 5 seconds and Temperature
reading for the next five seconds and so on.
• When we use subroutine instruction, Subroutine address
must be same in JSR instruction of main program and RET
instruction of subroutine program.
12. PLC Program to Control Traffic Lights and Pedestrian
Lights

• Problem Description
• Implement controlling of Traffic Lights and
Pedestrian Lights using PLC in Ladder
Diagram programming language.
• Problem Solution
• As we have solved Traffic Lights problem, similarly we can solve this problem
using Sequencer Output SQO instruction.
• In this program, two bits and outputs are added.
• File length, Control, File and Destination remain same.
• Mask data changes due to 2 added outputs.
• As 2 outputs are added, Mask will now have value 00FFh as total number of bits
used are 8. In order to pass all 8bits, data flow is masked with 11111111 and
moved to output.
• When Green light of South-North is ON, Pedestrian Light and Red light of East-
West should be ON and vice-versa.
• Use Coil to Master Start and Stop the entire process.
• While using ordinary method to Master Start and Stop, when stop is pressed,
the process is just paused and is not entirely reset, hence resetting of Position
in SQO instruction and Outputs using the same Stop PB can be done manually.
13. PLC Program to Control Traffic Lights

• Problem Description
• Implement controlling of Traffic Lights in
PLC using Ladder Diagram programming
language.
• Problem Solution
• There are two methods to solve this problem. One is by using stack operation and the other one is by using
sequencer output method.
• Sequencer output method is best suited for this problem since very less configuration is needed and program
length is also reduced.
• In this method, we need to assign SQO instruction by configuring all the parameters given in the instruction.
• File, Mask, Dest, Control, Length and Positions are parameters which we need to configure.
• File : It is the starting address for the registers in the sequencer file.
• Mask : Mask is the bit pattern through which data flow happens from source to the destination address. If there
is 1 in the masking, it passes values and if 0, it blocks the data flow.
• Dest : It is the address of the input to which the Sequencer Output instruction moves the data.
• Control : Is the address that contains the parameters with control information for the instruction. EN, DN and ER
are bit which sets according to the status of sequencer output. EN and DN bits are set just as in timers. ER bit
stands for Error bit, it is set when a negative position/length value is detected by the processor, or zero length
value.
• Length : It is the number of steps of the sequencer file starting at position 1. Position 0 is the start-up position.
• Position: It indicated the steps that is desired to start the sequencer instruction. The start position is all zeros,
this is represented as the neutral position; so no outputs will be turned ON in position 0.
• So to start the actual function of output sequence, Position 1 is determined as starting sequence while
programming.
• Integers or Bit Registers are used as Destination Address.
14. PLC Program to Control Level of a Single Tank

• 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 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.
15. PLC Program to Control Level of Two Tanks

• Problem Description
• Two simultaneous processes are to be
performed in two separate tanks which are
connected through a valve. Process 1
takes place in the 1st tank and Process 2
takes in the 2nd tank. Control level of
these tanks in PLC using Ladder Diagram
programming language.
• Problem Solution
• Mount two level switches in the first tank and two
switches in the second tanks. Both switches of tanks
detect High and Low level of the tanks.
• Install inlet valve to control inlet process flow and outlet
valve to control outlet process flow.
• Install one more connecting valve to control draining of
process material from Process 1 Tank to Process 2
Tank.
• Provide interlocking to prevent from malfunctioning or
overflowing.
16. PLC Program to Control Level of Series Tanks

• Problem Description
• Two tanks are connected with each other
through a pipeline in series. Level of both
tanks is to be controlled. Implement this
operation in PLC using Ladder Diagram
programming language.
• Problem Solution
• Assume that the storage tank has more capacity than the
feeder tank.To measure level of both tanks, level switches
are installed.
• Outlet valve is operated by another process and it is
operated according to the requirement. So outlet flow varies.
Inlet valve is to be operated by PLC to control the level.
• Use interlocking to control the inlet valve.
• Connect Level Switches to the input module of PLC.
Connect inlet valve with the output module of PLC.
• PLC Program
17. PLC Program to Control Level of Parallel Tanks

• Problem Description
• Two tanks are connected in parallel with a
stream line. Heat and Cool the same
material and control level of both tanks.
Implement this in PLC using Ladder
Diagram programming language.
• Problem Solution
• Heater is used to heat the material and cooling water supply is used to
cool down material temperature.
• Inlet valve feeds Material to both tanks.
• One tank stores material for heating purpose and the other stores
material for cooling purpose.
• Level switches are used to detect Low level and High level in both the
tanks.
• Outlet valves are installed in the bottom of both the tanks to drain
products for further process.
• Mount temperature sensors to measure temperature of both the tanks.
• Controlling of these tanks is independent of inlet flow assuming inlet
flow to be constant.
18. PLC Program for Heating Liquid in the Tank by Heater

• Problem Description
• Controlling heating of Liquid in the tank
using heater. Implement this process in
PLC using Ladder Diagram programming
language.
• 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 and to
heat the liquid, heater is used.
• Low Level Switch is mounted at the bottom of the tank and Level
High switch is mounted at the side-upper most position.
• Heater is installed inside the tank and temperature sensor such
as RTD or Thermocouple may be used to detect the temperature
of liquid in the tank.
19. 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 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.
20. PLC Program to Control Three Mixing Devices in a
Processing Line

• Problem Description
• Control three mixing devices in a process line.
Two mixing devices are running in the parallel
to each other. When any one of the mixing
process stops, individual stop switches turn
the third mixing device ON and the device
operated by the stop button is stopped.
Implement automation of this system in PLC
using Ladder Diagram programming language.
• Problem Solution
• Use limit switches, control valves and motor agitators
separately for all three mixing tanks.
• The only common input to all these tanks is Material
feeding by two valves.
• Use separate timers for each tank for mixing.
• First two tanks are tagged as primary mixing tanks and
the third one is said to be secondary mixing tank.
• Use switches of stop buttons of both Primary mixing
processes as an input to start the tank third to enter into
the process sequence.
21. PLC Program to Maintain the Pressure Head in a Bottle
Filling System

• Problem Description
• Bottle filling has a constant speed of filling
20 bottles per minute. This speed depends
on level of the tank due to its head
pressure. To maintain this speed, pressure
head of the filling tank has to be
maintained at a particular. Implement this
automation in PLC using Ladder Diagram
programming language.
• Problem Solution
• Solid state level switches cannot be used here since level has to be continuously monitored.
• Pressure is proportional to level. As level of a tank increases, pressure also increases.
• Level gauges are highly sensitive to very small variations. Many companies such as Rockwall
Automation and Endress+Hauser manufacture pressure gauges to measure liquid level of a
tank.
• Output of this gauge is terms of pressure so we have to convert pressure into equivalent
current output. But let us assume here that maximum pressure that means when tank is full, it
gives 20mA output and when tank is empty, it gives 4mA output which is in standard form 4-
20mA.
• Use conversion instructions to convert this 4-20mA data into registers. To do this, Analog
modules for PLCs are used.
• These modules convert 4-20mA into equivalent digital level signals.
• Output of this Analog modules are stored in Hex form which are then processed by the
processor and hex output is generated again.
• Just like Analog input modules, Analog output modules are used convert digital output data into
equivalent current signals to operate power supply circuit which varies output accordingly, to
drive the final control element, here control valve.
22. 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 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.
23. 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 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.
24. PLC Program to Control the Sequence
of Conveyors and Interlocking Them
• Problem Description
• A feeder drops material on the conveyor
which sends material for further process
through one more conveyor. Conveyor
must start automatically when material is
dropped on it. Implement automation of
this in PLC using Ladder Diagram
programming language.
•Problem Solution
 Feeder has a motor mounted to feed material on conveyor belts.
 Load cells are installed at the bottom of conveyor belts to detect
if material is present on the conveyor belt.
 When material falls on conveyor belt 1, motor 1 should start, and
when material in present on conveyor belt 2, motor 2 remain On.
 Switches can also be used sometimes to detect material’s
presence. But for more reliable operation, Load cells can be used
as shown in the diagram above.
25. PLC Program to Operate Drilling of Parts

• Problem Description
• Whenever a part is placed on the drilling
table, pneumatic clamper clamps the part
and drilling process is done. When drilling
is done, clamper releases the part by
releasing pressure. When another part is
detected, the process is repeated.
Implement this in PLC using Ladder
Diagram programming language.
• Problem Solution
• Set lower and upper limit of a motor to stop and
start the drilling process. This is done for precise
drilling and to obtain uniformity.
• Pressure operated clamping device is used to
hold the objects firmly. This is operated by 20psig
air supply which is provided when an object is
detected.
• Limit detection object is placed on the motor to
detect upper and lower limit by the switches.
26. PLC Program for Cleaning and Rinsing Bottles in
Beverage Industries

• Problem Description
• Number of bottles are moving on the
conveyor belt. Cleaning of Rinsing of
these bottles is to be performed.
Implement automation of this process in
PLC using Ladder Diagram programming
language.
• Problem Solution
• A huge cylinder carries all the bottles through this process which rotates on a
fixed RPM.
• Use a switch to sense the bottle from the conveyor belt.
• Conveyor belt also has a fixed speed.
• Mechanical clip is used to hold the bottle tightly throughout the process. This
mechanical switch has two positions, hold and return.
• Motor is used to turn the bottles. Motor is used such that it rotates only at 180o
angle turning bottles upside down.
• Along with the cylinder, water supply tubes are fixed in the position and
solenoid valves are used to sprinkle water inside the bottles.
• Proximity switch is used to detect the upside position of a bottle to perform
rinsing and cleaning.
• There are total 30 number of bottles cleaned and rinsed simultaneously in a
process stream. Let us program cleaning of a single bottle.
27. PLC Program to Sort Parts for Quality Control on
Conveyor

• Problem Description
• Parts are moving on the conveyor from
one process line to other with a constant
speed. Out of 1000 part, one part is taken
out for quality check. Implement
automation of this process in PLC using
Ladder Diagram programming language.
• Problem Solution
• To detect the parts, detector such as proximity switch, optical
sensors or any other sensor is used.
• Connect output of this detector to Input Module of PLC which
sets and resets image memory according to parts’ detection.
• Give this detection, as an input to Up Counter which is
incremented with each part’s detection.
• Set counter preset value to 1000.
• Operate Solenoid for a few seconds until the part is diverted
for quality check.
• PLC Program
28. PLC Program to Heat the Liquid in
Tank by Steam Flow
• Problem Description
• Heating of the liquid in the tank is to be
performed. To heat this liquid, steam flow
is controlled. If the temperature is detected
less than the set point, increase the steam
flow and vice-versa. Implement
automation of this process in PLC using
Ladder Diagram programming language.
• Problem Solution
• To detect temperature, RTD PT100 is used. This RTD has a range from -200°C to 650°C.
• Let’s say that the temperature of liquid in the tank is to be maintained at 100°C. Calibrate
RTD to operate in this range.
• RTD PT100 has a resistance of 100Ω when it is at 0°C and 138.4Ω when at 100°C.
• Calibrate 4-20mA output such that when input is 0°C, it gives 4mA output and when it is
100°C, it gives output 20mA.
• Feed this data to Analog Input Module of PLC. Input module converts 4-20mA into
equivalent 0000h to FFFFh hex number. This means when temperature is 0°C, data
stored in the register is 0000 0000 0000 0000, and when output is 100°C, data stored in
register is 1111 1111 1111 1111.
• Analog Output module converts this data into equivalent 4-20mA which is then converted
into 3-15psi to operate control valve.
• One more method to solve this problem is by calculating Output in terms of 4-20mA for
-200°C-650°C that when -200°C, it gives 4mA and when 650°C, it gives 20mA.
• But then this would not be precise control action because data conversion gives minor
errors while performing conversion.
29. PLC Program for Heating and Mixing of Products

• Problem Description
• Material A and Material B are collected in
a tank. These products are to be mixed
and heated till it reaches set point
temperature value. Implement automation
of this system in PLC using Ladder
Diagram programming language.
• 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.
• Heater is installed inside the tank and temperature sensor such as RTD or
Thermocouple is used to detect the temperature of liquid in the tank.
• This mixer is mixed until set point temperature is achieved.
• Outlet valve is then operated to drain the mixed product.
30. PLC Program to Maintain Level of a Tank

• Problem Description
• By using a control valve which is operated
with standard pneumatic signal 3-15psi,
level of a tank is to be maintained.
Implement automation of this tank level
system in PLC using Ladder Diagram
programming language.
• Problem Solution
• To measure the continuous level, Ultrasonic Sensor may be used.
• Rosemount 3100 series Ultrasonic Level Transmitters can be used to measure the
level of the tank.
• Range of these transmitters is 9-11m.
• Output of these transmitters is in standard electrical signal 4-20mA. Convert this
standard signal into digital signal by connecting level transmitter to Analog Input
Module of PLC.
• Calibrate the transmitter and set output such that it gives 4mA when tank is empty
and 20mA when tank is full. Convert this data in accordance to level in Centimeters.
• This gives output such as 0000h when input is 4mA and FFFFh when output is
20mA. Determine the level of tank to be maintained. Convert preset value to be the
maximum output that means if the level to be maintained is 370cm, then convert
value such that output is FFFFh when level is 370cm.
• At low level, valve must be fully open, so air to close valve is used here to maintain
the inlet flow.
31. PLC Program for Continuous Stirred Tank Reactor

• Problem Description
• Control Continuous Stirred Tank Reactor
of a chemical plant. Implement automation
to control this CSTR in PLC using Ladder
Diagram programming language.
• Problem Solution
• Basically three parameters are controlled in this reactor. Temperature, Flow and Level of
the tank.
• Temperature controlling is best done by PID Temperature controller, so in many industries,
controlling of Temperature is assigned to PID control loop as shown in the diagram above.
• Continuous level measurement is required. To do this, capacitance level measurement
technique is used because the tank may be Open or Close depending upon the process
application. Capacitance Measurement method works for both Open and Closed tanks.
• Capacitance Level Measurement sensor comes along with Transmitter to convert level
output into equivalent standard current signal 4-20mA. If level sensor does not have a
transmitter, calibration has to be done in order to achieve 4mA for Low level and 20mA for
High level.
• Analog I/O Modules are used to deal with analog input signals and analog output final
control elements.
• To process data, necessary conversions are made on the basis of desired output
requirement.
32. PLC Program to Measure Unknown
Frequency
• Problem Description
• Measure and display unknown frequency.
Implement this in PLC using Ladder
Diagram programming language.
• Problem Solution
• Define an address to which Unknown frequency is given as an input.
• This address is set to 1 whenever a positive pulse is detected otherwise
remain 0.
• And Frequency may be defined as number of cycles per second. This
cycle includes three terms, high (positive) pulse, zero and negative pulse.
• Frequency input detects positive pulses.
• Give this input to Up Counter to determine the number of positive pulses
per second with unknown frequency.
• Use timer to stop the counter from counting after 1sec.
• Reset counter after measuring of frequency is done.
• However to define a particular Amplitude signals, Limit instruction may be
useful.
33. PLC Program to Measure the Scan Cycle of PLC

• Problem Description
• Measure the scan cycle of a PLC using
Ladder Diagram programming language.
• Problem Solution
• Use toggling output which toggles every time scan cycle is
completed.
• This can be done by connecting an XIO contact and an
output in series with the same addresses.
• Use this toggling bit as an input to up counter to increment
number of times the bit toggles.
• Use 1sec timer to stop the counter from counting, because
the bit is toggling continuously and it might unnecessarily
increment counter value even after 1sec is over.
• Reset counter to clear the accumulator data to measure the
scan cycle again.
34. PLC Program to Heat and Bend Glass Tubes

• Problem Description
• Heated glass tubes are passing in a
process line having a particular length
which are to be bent. To manufacture
fluorescent bulbs, these tubes are to be
bent in U-Shape. Automate this process in
PLC using Ladder Diagram programming
language.
• Problem Solution
• Diagram is an example of how bending process is done.
• Pneumatic operated rod moves in right and left direction which
forces glass tube to bend through metal support.
• Metal support is continuously heated so that glass tubes do not
break while bending.
• When bending is done, two cutters are used to cut the bent glass
tube.
• Proximity switch detects a length to be cut by the cutter.
• Metal support are mounted close to each other such that only
bending rod and glass tube together can pass through it.
• Metal support is not exactly square as shown in the diagram, it has
curvy ends for smoother bending operation.
35. PLC Program to Perform Bottle’s Capping with Rotating
Mechanism

• Problem Description
• Water bottles are moved on a conveyor for
capping. Screw caps are screwed to close
the opening end of the bottle using
rotating mechanism. Implement this
process in PLC using Ladder Diagram
programming language.
• Problem Solution
• To sense the bottle, proximity sensor is used.
• Used a timer to stop the cylinder motor for 2secs to screw caps.
• Used one more timer to run the motor for 1sec to rotate the cylinder.
• Bit Shift register is also used to perform this operation.
• Count the number of steps capping machine is placed from the
sensor and set bit position to operate capping machine accordingly.
• In this example as you can see, bottle is 7 steps away from the
proximity switch, so if Bit register B3:0 is used, then capping machine
should be operated when B3:0/0 is shifted to B3:0/6.
• Two inputs are given to this Capping machine, electric supply to run
motor and pneumatic supply to push machine down cap ram.
36. PLC Program to Perform Capping of Beverage Bottles

• Problem Description
• Beverage bottles are moving on a
conveyor belt. Capping of these bottles is
performed. Crown cork caps are used for
these bottles. Implement automation of
this process in PLC using Ladder Diagram
programming language.
• Problem Solution
• To sense the bottle, proximity sensor is used.
• Timer is used to stop the conveyor for 1sec for capping procedure.
• Bit Shift register is also used to perform this operation.
• Count the number of steps capping machine is placed from the sensor
and set bit position to operate capping machine accordingly.
• In this example as you can see, bottle is 8 steps away from the proximity
switch, so if Bit register B3:0 is used, then capping machine should be
operated when B3:0/0 is shifted to B3:0/7.
• Capping machine is operated by pneumatic system. It is activated by air
supply when energized.
• Similarly we can even make an arrangement where two capping
machines are operated, one to cap small bottles and other for larger
bottles.
37. 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 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.
38. PLC Program to Measure Time Taken by an Event

• Problem Description
• There are certain objects moving on
conveyor belt. Time of an object to reach
from one end to another end of the
conveyor is to be measured. Implement
this in PLC using Ladder Diagram
programming language.
• Problem Solution
• Install two proximity switches, one at the head end and
another at the tail end.
• When first proximity detects an object, it latches and
output starting timer.
• When another proximity placed at the tail end detects the
same object, timer is stopped.
• Move preset value to any register or output displays.
• This shows time taken by an event.
• Similar phenomena can be applied to measure time
taken to fill an empty tank.
39. PLC Program to Operate Light as an Emergency Signal

• Problem Description
• Boiler is being operated and monitored
using a PLC. Temperature set point of
boiler is 600°C and maximum temperature
limit is 610°C. If temperature rises above
its maximum limit. Hooter and emergency
lights are activated in order to inform
operator. Implement this in PLC using
Ladder Diagram programming language.
• Problem Solution
• There are two methods to solve this problem. One is by using stack operation and
the other one is by using sequencer output method.
• Sequencer output method is best suited for this problem since very less
configuration is needed and program length is also reduced.
• In this method, we need to assign SQO instruction by configuring all the parameters
given in the instruction.
• Alarm signal must be continuous until operator turns it off manually.
• Sequencing of Lights and Hooter is done here by using SQO Sequential Output to
operate lights and hooter.
• Set timer to activate and deactivate hooter and lights or to be précised, change
sequence of output.
• Let’s say, these both outputs are energized for 1sec and de-energized for next
1sec.
• In sequencer output, the start position is all zeros. So to start the actual function of
output sequence, Position 1 is determined as starting sequence while programming.
40. PLC Program to Reset all Non-Retentive Outputs

• Problem Description
• Reset all Non-Retentive outputs of a
process. Implement this by using MCR
instruction in PLC using Ladder Diagram
programming language.
• Problem Solution
• By using Master Control Relay MCR instruction, we can solve
this problem.
• When this instruction is enable, line is energized, it turns on.
• When MCR is OFF, the number of following ladder diagram
lines specified are turned off.
• In many PLCs, all outputs are turned off while in many PLCs,
only Non-retentive outputs are turned off.
• In PLCs such Allen Bradley and Siemens, all non-retentive
outputs are turned off.
• The MCR must be turned on to be inactive. If the function goes
off for some reason, it is active and turns the specified lines off.

You might also like