Menu
CoddyTech

Step by Step

Part of the Analog and Sequences section of Coddy's PLC Programming journey. Lesson 8 of 17.

Now add the second step. When the tank is full, move to step 2 instead of 0, and mix.

A step that lasts a set time uses a timer. Put a TON after the step's compare box: it times while the machine is in that step, and its output powers the MOVE to the next step.

When the step changes, the compare box stops passing power and the TON resets by itself, ready for the next time.

challenge icon

Challenge

Medium
  • at High, move 2 into Step instead of 0
  • in step 2, run the Mixer
  • after 5 seconds in step 2, move 0 into Step

Try it yourself

{"v":1,"lang":"ld","tags":[{"name":"Step","type":"INT"}],"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":0,"dst":"Step"}]},{"els":[{"t":"cmp","op":"EQ","a":"Step","b":1},{"t":"coil","tag":"Fill"}]}]}

All lessons in Analog and Sequences

Practice on your own: PLC playground