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
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 simulatorWhat it is called on other controllers
| Platform | Equivalent |
|---|---|
| Rockwell (Studio 5000) | RES |
| Siemens (TIA Portal) | The reset input on the timer or counter block |
| Mitsubishi (GX Works) | RST |
| CODESYS and IEC 61131-3 | The 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.
- Service Interval (RTO + RES)Total ACCUMULATED run-time, across any number of stop/starts, must trigger a service lamp at 3 seconds. A normal TON forgets on every stop; the retentive RTO remembers until you RES it.
- Batch Counter (CTU + RES)Count parts passing a sensor; after 4 parts the batch is done and a lamp turns on. A reset button starts the next batch. Counters count RUNG EDGES: a part sitting on the sensor counts once, not forever.
