Loading local progress…
Challenges
Practise in
Level 1, 0 XP · your progress
Challenge 01 · Code it · Free

One button, start and stop

Each press of one button changes the pump over.

The pump panel has one push button. Press it once and PumpOn turns ON. Press it again and PumpOn turns OFF. Holding the button down changes the pump only once.

Free, with no sign-up. Sign in to score the points and keep your streak.

The 3D pump skid this challenge runs on
Test replay

Press, let go, press again

Test 1 of 2
Set by the testChecked by the testStep 6 of 6 · 520 ms
Level
Easy · 10 points
Kind
Code it
Time
About 8 min
Pass rate
New
Machine
3D pump skid
Siemens
LAD and SCL
Rockwell
Ladder and Structured Text
Beckhoff
Structured Text
Automatic checks

What the checks test

  1. The first press of Button turns PumpOn ON, on the the press arrives.
  2. Letting go of Button leaves PumpOn as it is.
  3. The next press turns PumpOn OFF, and the one after turns it ON again.
  4. Holding Button down changes PumpOn once, not on every scan.

The checks run 2 tests on the machine, scan by scan: Press, let go, press again; A held button counts once.

On site

Where you’d find this

A small dosing pump in a water treatment kiosk has one lit push button: press to start, press again to stop.

If the program flips the pump on every scan the button is held, the motor chatters on and off and wears out its contactor.

The machine

How it should behave

Press
Each new press of Button changes PumpOn over.
Hold
A held button counts as one press.

Press Run, then click Button. The pump starts. Click it again and the pump stops.

Keep going

More challenges