Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 137
Timer and Counter Instructions (TON, TOF, RTO, TONR, TOFR, RTOR, CTU, CTD, CTUD, RES) Chapter 3
Retentive Timer On with
Reset (RTOR)
The RTOR instruction is a retentive timer that accumulates time when
TimerEnable is set.
This instruction is available in relay ladder as two separate instructions:
· RTO (See page 124
).
· RES (See page 153
).
Operands:
Structured Text
Function Block Operands
FBD_TIMER Structure
Variable Type Format Description
RTOR tag FBD_TIMER Structure RTOR structure
Operand Type Format Description
RTOR tag FBD_TIMER Structure RTOR structure
Input Parameter Data Type Description
EnableIn BOOL Function Block
If cleared, the instruction does not execute and outputs are not updated.
If set, the instruction executes.
Default is set.
Structured Text
No effect. The instruction executes.
TimerEnable BOOL If set, this enables the timer to run and accumulate time.
Default is cleared.
PRE DINT Timer preset value. This is the value in 1ms units that ACC must reach before timing is finished. If
invalid, the instruction sets the appropriate bit in Status and the timer does not execute.
Valid = 0 to maximum positive integer
Reset BOOL Request to reset the timer. When set, the timer resets.
Output Parameter Data Type Description
EnableOut BOOL The instruction produced a valid result.
ACC DINT Accumulated time in milliseconds. This value is retained even while the TimerEnable input is cleared.
This makes the behavior of this block different than the TONR block.
EN BOOL Timer enabled output. Indicates the timer instruction is enabled.
TT BOOL Timer timing output. When set, a timing operation is in progress.
DN BOOL Timing done output. Indicates when accumulated time is greater than or equal to preset.
Status DINT Status of the function block.
InstructFault (Status.0) BOOL The instruction detected one of the following execution errors. This is not a minor or major controller
error. Check the remaining status bits to determine what occurred.
PresetInv (Status.1) BOOL The preset value is invalid.