A Safe Stop
Part of the Analog and Sequences section of Coddy's PLC Programming journey. Lesson 10 of 17.
Every sequence needs a safe stop: press Stop and the machine goes to a safe state at once, whatever step it was in. Here that is step 0, idle.
Every output is on only in its own step, so one MOVE turns them all off. Stop is wired NC: it reads FALSE while pressed. So a normally closed contact on Stop passes power while someone presses it.
Put this rung after the transitions and before the output rungs. Rungs solve top to bottom, so Step is already 0 when the outputs are solved, and Stop wins even when Start is pressed at the same time.
A real machine also has an emergency stop wired outside the PLC program. This rung is the program's own stop, not a safety device.
Challenge
MediumAdd a rung: while Stop is pressed, move 0 into Step. Put it between the transition rungs and the output rungs.
Press Stop in the middle of a batch, then Start a new one.
Try it yourself
{"v":1,"lang":"ld","tags":[{"name":"Step","type":"INT"},{"name":"T1","type":"TON"}],"rungs":[{"els":[{"t":"cmp","op":"EQ","a":"Step","b":0},{"t":"no","tag":"Start"},{"t":"move","src":1,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":1},{"t":"no","tag":"High"},{"t":"move","src":2,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":2},{"t":"TON","inst":"T1","pt":"T#5s"},{"t":"move","src":3,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":3},{"t":"cmp","op":"EQ","a":"Level","b":0},{"t":"move","src":0,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":1},{"t":"coil","tag":"Fill"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":2},{"t":"coil","tag":"Mixer"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":3},{"t":"coil","tag":"Drain"}]}]}All lessons in Analog and Sequences
Practice on your own: PLC playground