r/mechatronics • u/EmbarrassedScreen134 • 2d ago
Develop a ladder logic program to switch ON a lamp after a delay of 5 seconds and turning it off after 10 seconds using a timer instruction.
I need to develop a ladder logic program using timer instructions to perform the following operation:
- When the START input is activated, the timer should begin counting.
- After a delay of 5 seconds, the lamp should turn ON.
- The lamp should remain ON for 10 seconds.
- After 10 seconds, the lamp should automatically turn OFF.
Could someone help me with the correct ladder logic diagram and explain which timer instructions (TON, TOF, or others) should be used?
I would also appreciate a simple explanation of the working sequence.
1
Upvotes
1
u/Relevant_Throat_7277 2d ago
TON is the one you want here, not TOF. TOF delays the switch-off after the input drops, which is almost the opposite of this sequence, and it is the mix-up I see most often with this exact exercise.
I would do it with two on-delay timers. Think of the first one as the waiting timer and the second one as the lamp timer. When START comes on, T1 starts timing with a preset of 5 seconds, and nothing happens to the lamp while it is timing. Once those 5 seconds are up, T1's output comes on and drives the lamp, and that same output also starts T2, preset to 10 seconds. So the lamp stays on while T2 is timing, and when T2 finishes its output breaks the circuit, the lamp goes off and everything resets ready for the next START.
In ladder terms, I usually set it up like this. First rung, START drives an internal RUN bit, with a normally closed contact from T2 in series so the run bit drops out when the cycle is finished. Second rung, a normally open contact of RUN drives T1, the 5 second timer. Third rung, a normally open contact of T1 drives the lamp, and a fourth rung uses that same T1 contact to drive T2, the 10 second timer. Once T2 is done, its contact in the first rung opens and RUN drops, which resets both timers.
One detail worth checking is whether your START is a maintained switch or a momentary pushbutton. If it stays on, you can skip the latch and just let the switch hold RUN. If it is momentary, keep the seal-in, otherwise T1 will reset the moment you let go of the button, and I learned that one the hard way on a bench rig.
Try it in simulation first and watch T1, T2 and the lamp in the watch table before downloading anything to a real PLC, and keep any real safety function hardwired and separate, do not let a timing exercise like this be the safety logic.