We will look at a PLC basic tutorial of a paint spraying station. Following the 5 steps to program development this PLC programming example should fully explain the procedure for developing the PLC program logic. Ladder will be our PLC programming language.
We will be using the Do-more Designer software which comes with a simulator. This fully functional program is offered free of charge at automation direct.
Define the task:
Paint spraying system where boxes are fed by gravity through a feeder magazine one at a time onto a moving conveyor belt. Upon the start signal, boxes are pushed towards the conveyor by valve 1. This is a cylinder which extends and retracts which operates switches S1 and S2 respectfully. A spraying nozzle paints each box as it passes under the paint spray controlled by valve 2. A sensor (S3) counts each box being sprayed. When 6 boxes have been painted the valve 2 shuts off (paint spray) and valve 1 (cylinder) stops moving boxes onto the conveyor. Three seconds later the conveyor stops moving and the hopper with its load moves forward (valve 3) where it is emptied. Ten seconds later the hopper returns to the original position. The cycle is then complete and waits for a start signal again.
Define the Inputs and Outputs:
Start Switch – On/Off (Normally Open) – NO
Stop Switch – On/Off (Normally Closed) – NC
S1 – Valve 1 (cylinder retract) On/Off – NO
S2 – Valve 1 (cylinder extend) On/Off – NO
S3 – Box Detected- On/Off – NO
Motor – On/Off (Conveyor Run)
Valve 1- Cylinder to feed boxes – On/Off
Valve 2- Paint Spray – On/Off
Valve 3- Cylinder to move hopper – On/Off
Develop a logical sequence of operation:
Fully understanding the logic before starting to program can save you time and frustration.
Sequence Table: The following is a sequence table for our paint spraying application.
1 – Input / Ouput ON
0 – Input / Output OFF
x – Input / Output Does not Matter
When the power goes off and comes on the sequence will continue. This means that we must use memory retentive areas of the PLC. The stop pushbutton will stop the sequence. The start will resume until the end.
Develop the PLC program:
The best way to see the development of the programmable logic controller program is to follow the sequence table along with the following program. You will see the direct correlation between the two and get a good understanding of the process.
Control of the Motor (Conveyor) and the paint spray is done with the V0:0 contacts in front of the actual PLC output. The conveyor and paint spray will stop when the timer 0 is done. This is the delay after the last box is detected to allow the box to be painted and loaded onto the hopper.
Test the program:
Watch on YouTube: PLC Programming Example – Paint Spraying
If you have any questions or need further information please contact me.
If you’re like most of my readers, you’re committed to learning about technology. Numbering systems used in PLC’s are not difficult to learn and understand. We will walk through the numbering systems used in PLCs. This includes Bits, Decimal, Hexadecimal, ASCII and Floating Point.
To get this free article, subscribe to my free email newsletter.
Use the information to inform other people how numbering systems work. Sign up now.
The ‘Robust Data Logging for Free’ eBook is also available as a free download. The link is included when you subscribe to ACC Automation.