Elapsed Time
Part of the Timers section of Coddy's PLC Programming journey. Lesson 2 of 18.
A timer box has a second output: ET, the elapsed time. While IN is on, ET counts up from T#0s. When it reaches PT it stops there and Q turns on. When IN turns off, ET drops back to zero.
While the program runs, the box shows its ET under it. Watch it count, then turn the input off halfway: it jumps back to zero, and the next start counts the whole time again.
The Signals tab draws each BOOL input and output as a line over time, high while it is TRUE. A drawing like that is a timing diagram. In it you can see the delay: SW1 goes high, and the lamp goes high a little to the right.
Two timers can share one input. Each has its own name, its own PT and its own ET.
Challenge
EasyRung 1 lights Amber 3 s after SW1. Add a rung that lights Green 1 s after SW1, with a second timer T2.
Run it, watch both boxes count and look at the Signals tab, then Check.
Try it yourself
{"v":1,"lang":"ld","tags":[{"name":"T1","type":"TON"}],"rungs":[{"els":[{"t":"no","tag":"SW1"},{"t":"TON","inst":"T1","pt":"T#3s"},{"t":"coil","tag":"Amber"}]},{"els":[]}]}All lessons in Timers
4Project: Pedestrian Crossing
Green Until PressedAmber Before RedRed and WalkClear the CrossingThe Wait LampNight ModePractice on your own: PLC playground