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 mnemonicAmerican mnemonicNameData typeDirectionRequiredMeaning
InstanceInstanceInstance (the block’s memory)IEC_TIMER / TIMER, IEC_COUNTER / COUNTERInputYesTimer or counter to reset.
MnemonicNameData typeDirectionRequiredMeaning
InstanceInstance (the block’s memory)IEC_TIMER, IEC_COUNTERInputYesTimer or counter to reset.
MnemonicNameData typeDirectionRequiredMeaning
InstanceInstance (the block’s memory)TIMER, COUNTERInputYesTimer or counter to reset.

Timing diagram

European style
S1S2C1.CV0123001234567891011121314scans
American style
S1S2C1.ACC0123001234567891011121314scans

Timing diagram checked against the simulator (the same engine as the editor).

Example

European style
American style

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

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.

See also