Next Car
Part of the Analog and Sequences section of Coddy's PLC Programming journey. Lesson 16 of 17.
The car is clean. In step 5 the ExitLamp lights to tell the driver to go. The car drives off a second after the lamp lights, as long as every wash output is off.
A sequence should not guess how long a driver takes. It waits for the sensor: when CarIn goes FALSE, the bay is empty, and the wash moves back to step 0 for the next car.
Challenge
Medium- in step 5, light
ExitLamp - when
CarIngoes FALSE, move 0 intoStep
Then wash two cars in a row.
Try it yourself
{"v":1,"lang":"ld","tags":[{"name":"Step","type":"INT"},{"name":"T1","type":"TON"},{"name":"T2","type":"TON"},{"name":"T3","type":"TON"},{"name":"T4","type":"TON"}],"rungs":[{"els":[{"t":"cmp","op":"EQ","a":"Step","b":0},{"t":"no","tag":"Start"},{"t":"no","tag":"CarIn"},{"t":"move","src":1,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":1},{"t":"TON","inst":"T1","pt":"T#2s"},{"t":"move","src":2,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":2},{"t":"TON","inst":"T2","pt":"T#2s"},{"t":"move","src":3,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":3},{"t":"TON","inst":"T3","pt":"T#2s"},{"t":"move","src":4,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":4},{"t":"TON","inst":"T4","pt":"T#2s"},{"t":"move","src":5,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":1},{"t":"coil","tag":"Soap"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":2},{"t":"coil","tag":"Brush"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":3},{"t":"coil","tag":"Rinse"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":4},{"t":"coil","tag":"Dryer"}]}]}All lessons in Analog and Sequences
Practice on your own: PLC playground