HMI button output only stays on while pressed: fix the timer rung

6 min read · Published November 11, 2026

An HMI pushbutton output that turns off the moment you release has its timer enable conditioned on the button bit. Start the sequence through a one-shot contact and enable the stage timer from the system contact that is on in every scan. One press then gives one full 3-second output pulse.

An HMI pushbutton that turns its output off the moment you let go is not a broken screen and not a broken output. In a stage program the cause is nearly always the same one: the timer's enable contact is the HMI button bit, so the rung opens when the button opens. The timer resets, the timeout jump never fires, and the output follows your thumb. Two rung changes fix it. Start the sequence through a one-shot contact, and feed the timer from the system contact that is on in every scan. With a 3-second preset, one short press then produces one full 3-second pulse, whether you release after 1 second or hold for 10.

Why the output follows the button

The names below are the tags this kind of program uses: C2 is the HMI button bit, Y0 the output, T0 the timer, and S10, S20 and S30 the stages. In the timed stage S20, a normally open contact on C2 sits in series with timer T0, and T0 drives Y0.

A plain on-delay timer, the kind every ladder package ships, accumulates time only while its rung is true and resets to zero when the rung opens. So the 3-second run depends on C2 staying true the whole time:

  • Release after 1 second: the rung opens, T0 drops its 1.0 seconds back to 0, the stage never times out, and the jump to S30 never fires. Y0 is on only while you hold the button.
  • Hold past 3 seconds: the timer finishes, but C2 is still true, and the jumps can carry the sequence straight back for a second cycle with no off gap between them.

The button writes a request; the stage has to own the timing. If your button already writes a command bit into the PLC and the ladder does the rest, the pattern is right and only the enable choice inside the stage is wrong. The wiring side of that pattern is in make an HMI button turn on a PLC output through a command bit.

Symptoms and what each points to

  • Output on only while the button is held, and the timer value returns to 0 on release. The timer enable is the momentary bit itself. Fix the S20 rung first.
  • One press gives a correct cycle, but holding the button repeats it with no off gap. The start rung reads a level where it needs an edge. That is the S10 fix.
  • The sequence never advances to the next stage at all. Its timeout jump waits on a timer that cannot finish while the button is released.
  • The button bit still reads true in the PLC well after release. Different fault. The timer changes here will not help until the bit follows your press; the panel-side causes are covered in HMI function key bit stays on after a short press.

Change the start rung to a one-shot

In the stage that accepts the request, S10 here, replace the normally open C2 contact with a positive differential contact. A differential, or one-shot, contact passes power for exactly one scan when its bit turns on; the working definition in ladder logic is a signal one scan long, and small machines commonly scan in single-digit milliseconds. The request becomes a few-millisecond event no matter how long the press lasts.

That one change stops the repeat. Without it, a button held past the preset leaves C2 true when the timed stage ends, and the jumps bring the sequence straight back into a second 3-second run. With it, one press is one request, and the next cycle waits for a real release and press. The scan-level view of how long the panel keeps its bit written is in how many PLC scans an HMI momentary button bit stays on.

Held-button re-triggering is the same pattern behind timeout issues with HMI buttons that stay set while pressed.

Change the timer enable to the every-scan contact

In S20, replace the normally open C2 contact with SP1, the normally open system contact that is on in every scan. Every ladder package has an equivalent; use the system bit your documentation lists as true in every scan. The stage condition on S20 already gates the rung, so the timer now runs for exactly as long as the stage is active, and it keeps running after your finger leaves the screen.

This is the change that lets a short press complete. Release after 1 second of a 3-second preset and the rung stays true, so T0 carries its 1.0 seconds forward and times out 2.0 seconds later. Keep the button bit out of this rung entirely. If the count must survive a pause, that is a retentive timer decision to make deliberately with a retentive timer.

Order the timeout jump ahead of any return path

Rung order matters once the timer completes. Evaluate the timeout transition, S20 to S30 on T0 done, ahead of any rung that can send the sequence back toward the start stage, and delete C2 from the rung that no longer needs it. If a return path is evaluated first while C2 is still true, the sequence bounces back into the timed stage and a held button starts cycle two immediately. Match this ordering against the equivalent rungs in your own project; the rung numbers here belong to the program they came from. If stage-to-stage moves with an HMI button are new ground, the basics are in make an HMI button advance one stage in a PLC sequence.

If the panel switches screens mid-cycle

This program also carries a screen-change instruction: V2000 holds the desired screen number, V2001 the change-to number, and the panel switches screens when the two values differ. Because C2 lives on the screen being left, a screen change can open the button's circuit mid-cycle. With C2 out of the timer rung, that opening no longer stops T0. If your project has no such instruction pair, skip this section. Test the combination once anyway: start a cycle, let the screen change happen, and watch T0 keep counting to the preset.

Run the press-release-hold test

With Y0 safe to pulse:

  1. Put the PLC online and watch four points together: C2, the active stage, T0's accumulated value, and Y0.
  2. Press and release after about 1 second. T0 keeps counting past the release, reaches the 3.0-second preset, Y0 turns off, and the stage moves to S30.
  3. Hold the button for 5 seconds. You must get one cycle only: Y0 on for 3 seconds, then off for the remaining 2 seconds of the hold, with no second start while the button stays down.
  4. Release, then press again. A new full cycle must start.
  5. If the panel changes screens during the cycle, repeat step 2 with the screen change active and watch T0 still complete.

The 3-second preset is this example's number. Set the preset your process needs and repeat step 3 with a hold longer than that value before the machine runs product.

Worked example: a 3-second pulse from a 1-second press

Scenario: T0 preset 3.0 seconds, Y0 drives a stack light, and the operator presses C2 at t = 0 seconds and releases at t = 1.0 seconds.

  • At release, T0 has accumulated 1.0 seconds.
  • Time left to preset: 3.0 - 1.0 = 2.0 seconds.
  • SP1 holds the S20 rung true, so T0 times out at t = 3.0 seconds. Y0 has then been on for the full 3.0 seconds and turns off, and the jump to S30 fires.
  • Pulse length: 3.0 seconds, set by the preset, independent of the 1.0-second press.

Now the same press held 5.0 seconds. The positive differential fires for one scan, so the sequence enters S20 exactly once. Y0 runs from t = 0 to t = 3.0 seconds, then sits off for the remaining 2.0 seconds of the hold. Take the one-shot out and the held bit re-enters the timed stage: 3.0 seconds on, restart, on again, with no off gap.

Recommendation

Recommendation: treat the HMI bit as a start request only. Put a positive differential contact on it in the start stage, enable the stage timer from SP1 or your software's documented true-in-every-scan system contact, and place the timeout jump ahead of any path back to the start stage. Set the preset to the pulse the process needs, 3.0 seconds in this example, and accept the fix only after a 1-second release and a 5-second hold both give exactly one full-length cycle.

Questions

Can I hold the timer rung with a seal-in branch instead of the every-scan contact?

Yes. Seal the button contact with a parallel branch that opens when the stage ends. Never seal a plain timer with its own done contact: the done contact opens the rung at preset, the timer resets, and the rung chatters on and off every scan. In a stage program the every-scan contact plus the stage condition is the simpler rung to read.

Does the fix change if my timer is retentive?

A retentive timer keeps its accumulated value when the rung opens, so a release only pauses the count and the output finishes late, carrying leftover time into the next cycle. Use one only when the process wants elapsed time to survive a pause. For one fixed pulse per press, keep the plain timer behind the every-scan enable.

The button bit stays on in the PLC after I let go. Is that the same fault?

It is a different fault, and the rung changes here assume a bit that follows your press. Watch the bit in the PLC data view with your finger off the screen: if it still reads true, the panel is holding the bit and the sequence keeps re-running however the rungs are ordered. Sort the panel-side bit first.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote