Free
8 min

Fix 03 — Timer never times out

fix-itfaulttimerTONdelaymotorfundamentals

Ready to build this?

Sign up free — no credit card required. This scenario is included in the free tier.

Sign up to play this scenario →

Already have an account? Log in

Not ready to sign up? Run a live lab now — no signup →

Fix 03 — Timer never times out

Briefing

The motor should start 2 seconds after START is pressed, so people near the conveyor get a moment of warning. STOP cancels a countdown that is still running and stops the motor once it runs. The program has a timer, and it is called every scan, but the motor never starts. Find out why the timer never reaches 2 seconds, and fix it.

Objectives

  • After START is pressed and released, the motor stays off for about 2 seconds, then runs
  • STOP during the countdown cancels the start
  • STOP stops a running motor
  • After a stop, the next START waits the full delay again

Hints

  • Press and release START and watch the motor. Then ask what the timer's input is doing during the 2 seconds after the button is released.
  • A button is on for a fraction of a second, but a timer needs its input on for the whole delay. Something other than the button has to stay on during the countdown.
  • Whatever keeps the countdown going must also be cancelled by STOP, otherwise a stop during the delay will be ignored and the motor will still start.
  • Check the second start too: after a stop, the elapsed time must be back at zero so the next start waits the whole delay again.

I/O Table

Inputs

START

Start push-button (momentary NO)

BOOL · %I0.0

STOP

Stop push-button (TRUE = pressed)

BOOL · %I0.1

Outputs

MOTOR

Motor contactor

BOOL · %Q0.0

Your program will be tested against:

All test cases run automatically when you submit. Assertions are hidden until you pass.

  1. #1START → motor off for about 2 s, then on

    A momentary START begins a 2 second countdown, then the motor runs

  2. #2STOP during the countdown → motor never starts

    Pressing STOP while the delay is running cancels the start

  3. #3STOP → running motor stops

    STOP switches the motor off once it is running

  4. #4Start again after a stop → waits the full delay again

    The countdown starts from zero on every start

  5. #5STOP alone → motor stays off

    The motor never starts without START

Ready to build this?

Sign up free — no credit card required. This scenario is included in the free tier.

Sign up to play this scenario →

Already have an account? Log in

Not ready to sign up? Run a live lab now — no signup →