Here is a starter for you:
============================
Point A : There is a car and it is detected.
I:0/0
----||--------(O:1/0)
Where I:0/0 is where you have connected your "Input sensor"
...and O:1/0 is the Output that drives whatever this conveyor is runnning from.
OOOOPPPSSSS !!!!!<Once the car is no more in front of the sensor, the conveyor will stop.
So I need to latch this output.
I:0/0
----||----+----(O:1/0)
O:1/0 |
----||----+
OOOOPPPSSSS !!!!!<This conveyor will never stop
So Sensor no 2 goes in...but just where?
OOOOPPPSSSS !!!!!<
What if the motor conveyor motor does not start?
What if I get a signal from the sensor in the wrong sequence?
What if its not a car but Terry's dog walking in while the doors are open?
You will not be able to write this code IF you do not use your head.
Write the INs and OUTs
IN PLAIN TEXT
Write the sequence
IN PLAIN TEXT
Write all the "What ifs" you can imagine
IN PLAIN TEXT
THEN :
Structure your program : Give it a little logical order
How many sub-system will this system have, use one ladder file for each.
Within each ladder file plae the real outputs at the very bottom and the steps of logic starting in order from the top.
THEN :
Write the comments you would place on the first rung.
Example :
"This rung resets all counters and timers on initial power up of the PLC"
Then and only... write the code for this rung. Its should match the comments.
Of course you do not have to follow this procedure sooo strickly that you pass-out, blod flowing from your eyes, but it shows you that the most important thing about a program is:
STRUCTURE,STRUCTURE,STRUCTURE,STRUCTURE,STRUCTURE
COMMENTS
WHAT IF?