RES Reset a block (RES)
Also called: reset instruction, timer reset, counter reset, RES
Resets the accumulator and status bits of a timer or counter.
What it does
RES clears the accumulated value (ET / ACC or CV / ACC) and the status bits (Q / DN, TT, OV, UN) of the chosen instance as soon as power arrives.
When to use it
Mostly in the American style: reset an RTO (TONR) or a counter.
Operands
| European mnemonic | American mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|---|
| Instance | Instance | Instance (the block’s memory) | IEC_TIMER / TIMER, IEC_COUNTER / COUNTER | Input | Yes | Timer or counter to reset. |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| Instance | Instance (the block’s memory) | IEC_TIMER, IEC_COUNTER | Input | Yes | Timer or counter to reset. |
| Mnemonic | Name | Data type | Direction | Required | Meaning |
|---|---|---|---|---|---|
| Instance | Instance (the block’s memory) | TIMER, COUNTER | Input | Yes | Timer or counter to reset. |
Timing diagram
Timing diagram checked against the simulator (the same engine as the editor).
Example
S1 counts in C1; S2 resets C1.
Try it in the simulatorThe example opens in the free simulator; your own program stays as it was.
Behaviour in detail
- Immediate effect: the rest of the program already sees 0 in the same scan.
- Accepted instances: every timer and counter (TON, TOF, TP, TONR, CTU, CTD, CTUD).
- As long as power stays 1, the reset repeats on every scan: the block cannot advance meanwhile.
European (IEC) and American styles
The European style has no RES instruction: the block's R input is used (CTU, TONR). In the American style, RES is the normal way to reset an RTO or a counter.