Reset (output instruction)

RES: Reset

Clears a timer or counter accumulator and its done bit to zero.

Also called: reset timer, reset counter, clear accumulator.

RES(resettable)

What it does

RES points at a timer or a counter, not at a bit, and when its rung is true it zeroes both the accumulator and the status bits. It is the only way to clear a retentive timer, and the normal way to clear a counter between batches.

Because it acts the instant its rung is true, and every scan it stays true, a RES on a condition that is true for a long time will hold the timer or counter pinned at zero. That is a genuinely common bug, and the symptom is a counter that never counts or a timer that never times, with logic that reads perfectly correctly.

A rung you can run

Reset a batch counter, once, on the operator's command

[object Object]
XIC(Part_Sensor)ONS(Part_Edge)CTU(Batch,250)
XIC(HMI_Reset_Batch)ONS(Reset_Edge)RES(Batch)

The one shot on the reset is what stops a maintainer leaning on the HMI button from holding the counter at zero.

Run this rung in the simulator

What it is called on other controllers

PlatformEquivalent
Rockwell (Studio 5000)RES
Siemens (TIA Portal)The reset input on the timer or counter block
Mitsubishi (GX Works)RST
CODESYS and IEC 61131-3The reset input on the function block

Common mistakes

  • Leaving the RES rung true. The timer will sit at zero for as long as it is, and nothing about the rung looks wrong.
  • Resetting a counter on the same condition that increments it.
  • Using RES to try to clear a plain OTL bit. RES is for timers and counters; use OTU for a bit.

Practise it

Interactive exercises that use RES. Each one checks your ladder against a real scan.

Related instructions

All ladder logic instructions