Red and Walk
Part of the Timers section of Coddy's PLC Programming journey. Lesson 15 of 18.
Once the cars have red, the walkers may cross. Walk lights with red and stays lit for a fixed time. A second timer, started by the first, measures it:
When the walk time is over, the request is done: T2.Q resets Req, the timers reset, and the cars get green again.
The rule that keeps people safe: Walk must never be lit while the cars have green or amber. The checks watch for that on every scan.
Challenge
MediumWhen Red lights, light Walk for 5 s (DontWalk goes out). When the 5 s are over, reset Req so the cars get Green again.
Try it yourself
{"v":1,"lang":"ld","tags":[{"name":"Req","type":"BOOL"},{"name":"T1","type":"TON"}],"rungs":[{"els":[{"t":"no","tag":"WalkButton"},{"t":"set","tag":"Req"}]},{"els":[{"t":"no","tag":"Req"},{"t":"TON","inst":"T1","pt":"T#3s"}]},{"els":[{"t":"nc","tag":"Req"},{"t":"coil","tag":"Green"}]},{"els":[{"t":"no","tag":"Req"},{"t":"nc","tag":"T1.Q"},{"t":"coil","tag":"Amber"}]},{"els":[{"t":"no","tag":"T1.Q"},{"t":"coil","tag":"Red"}]},{"els":[{"t":"nc","tag":"Walk"},{"t":"coil","tag":"DontWalk"}]}]}All lessons in Timers
4Project: Pedestrian Crossing
Green Until PressedAmber Before RedRed and WalkClear the CrossingThe Wait LampNight ModePractice on your own: PLC playground