PLC Program to Perform Bottle’s Capping with Rotating Mechanism

This is a 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 Diagram

plc-program-perform-bottles-capping-rotating-mechanism-01

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.
PLC Program

Here is PLC program to Perform Bottle’s Capping with Rotating Mechanism, 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	= Proximity					 (Input)
 O:2/0	= Master coil / Run				 (Output)
 O:2/1	= Cylinder motor				 (Output)
 O:2/2	= Electric supply to capping machine motor	 (Output)
 O:2/3	= Pneumatic supply to cap ram			 (Output)
 BSL	= Bit shift left instruction			 (Logical)
 B3:0	= Bit shift Register				 (Register)
 B3:0/6	= Bit to energize capping machine		 (Bit)
 R6:0	= Control register				 (Register)
 T4:0	= Timer to run cylinder motor			 (Timer)
 T4:1	= Timer to stop cylinder motor timer for capping (Timer)
 LIM	= Limit output to perform capping                (Compare)

Ladder diagram to automate screw cap processplc-program-perform-bottles-capping-rotating-mechanism-02

advertisement
advertisement
Program Description
  • RUNG001, RUNG002 and RUNG003 are used to operate cylinder motor.
  • Assuming it takes 1.6secs to screw cap a bottle, conveyor is stopped for 2secs and capping is done.
  • When the system is started, cylinder driving motor with address O:2/1 runs for one 1sec and stops for 2secs. Timer is set to auto reset mode by giving XIO of T4:1/DN in series to it. T4:0 is used to de-energize cylinder driving motor coil with address O:2/1 after 1sec and T4:1 is used to energize the same coil after 2secs.
  • RUNG004, RUNG005 and RUNG006 are used to operate bit shift register BSL and Capping Machine with address O:2/2.
  • Whenever proximity sensor with input I:1/2 detects bottle and O:2/1 is energized, I:1/2 sets B3:0/0 bit. This bit is shifted when again this coil is energized.
  • From proximity to capping machine, distance is 7 steps. Hence bit B3:0/6 of B3:0 register is used to operate capping machine.
  • Capping machine motor is connected with output O:2/2 which is energized till the process is running. Hence, simply letting master coil run the capping machine motor.
  • When Accumulator value is between 2 to 18, pneumatic supply is activated and screw capping is operated that is when cylinder motor is stopped for 2secs and timer is between 0.2-1.8secs.
Runtime Test Cases
Inputs	                Output	     Physical Elements
I:1/2 = 1	        B3:0/0 = 1   Set first bit of bit register
O:2/0 = 1	        O:2/1 = 1    Start cylinder motor
T4:0/DN = 1     	O:2/1 = 1    Stop cylinder motor after 2secs
T4:1/DN = 1	        O:2/1 = 1    Start cylinder motor again
T4:0/DN = 0	        BSL/EN = 1   Shift bit to left
O:2/0 = 1	        O:2/2 = 1    Start capping machine motor
T4:0.ACC = 2<Accum<16	O:2/3 = 1    Activate pneumatic supply to
                                     push down cap ram for capping

Sanfoundry Global Education & Learning Series – PLC Algorithms.
To practice all PLC programs, here is complete set of 100+ PLC Problems and Solutions.

If you find any mistake above, kindly email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.