PLC Program to Control Spray-Painting of Parts

This is a PLC Program to Control Spray-Painting of Parts.

Problem Description

Control Spray-Painting operation in PLC using Ladder Diagram programming language.

Problem Diagram

plc-program-contol-spray-painting-parts-01

Problem Solution
  • Spray-Paining operation is similar to the bottle capping operation. The only difference is that Bottle Capping operation used timers while Spray-Paining operation do not require timers.
  • Two limit switches are used, one to detect hangers and other to detect parts.
  • Both are mounted exactly opposite to each other so that when part is not present, outputs are complement of each other.
  • Bit shift register is used to spray parts.
  • Oven is used to dry the parts after they are sprayed. This output is continuously ON and is not controlled.
PLC Program

Here is PLC program to Control Spray-Painting of Parts, along with program explanation and run time test cases.

List of Inputs and Outputs
 I:1/14	= Start					(Input)
 I:1/15	= Stop					(Input)
 I:1/0	= Limit switch (Hanger)			(Input)
 I:1/1	= Proximity (Part detection)		(Input)
 O:2/0	= Master coil / Run			(Output)
 O:2/1	= Oven					(Output)
 O:2/2	= Spray					(Output)
 BSL	= Bit shift left instruction		(Logical)
 B3:0	= Bit shift Register			(Register)
 B3:0/2	= Bit to energize capping machine	(Bit)
 R6:0	= Control register			(Register)

Ladder Diagram to operate Spray-Painingplc-program-contol-spray-painting-parts-02

advertisement
advertisement
Program Description
  • When Start PB is pressed, Oven with address O:2/0 is started.
  • RUNG002 and RUNG003 are used to operate bit shift register and Spray with address O:2/1.
  • I:1/0 and I:1/1 are mounted such that they are detected together. When Part is present, I:1/0 and I:1/1 both goes high setting bit B3:0/0. Shifting of this itself is operated by I:1/0 Hanger switch. So every time a hanger is detected, bit is shifted left.
  • From proximity to capping machine, station distance is 3 steps. Hence bit B3:0/2 of B3:0 register operates spray solenoid.
  • R6:0 is a control register where all the operations are handled.
Runtime Test Cases
Inputs	           Output	Physical Elements
I:1/14 = 1	   O:2/0 = 1	Turn ON oven
I:1/0 = 1	   BSL = 1	Shift bit to left
I:1/0 = I:1/1 = 1  B3:0/0 = 1	Set bit to operate Spray
B3:0/2 = 1         O:2/1 = 1	Activate spray

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.