Accumulates elapsed time across multiple activations and outputs TRUE when the total reaches the preset.
The RTO (Retentive Timer On-Delay) instruction works like TON, but with one important difference: when the input .IN goes FALSE, the elapsed time .ET is not reset. It retains its value and continues accumulating the next time .IN becomes TRUE.
Key behavior:
.ET retains its current value.Q becomes TRUEThis is useful for measuring total run time across intermittent operations, such as tracking cumulative motor operating hours or total welding time across multiple cycles.
Unlike
TON, theRTOtimer does not reset when the input goesFALSE. You must explicitly reset it when needed.
{GIF:HERE} - Adding an RTO retentive on-delay timer action to a step with name "timer_name", description "Timer description", instruction set to RTO, and duration of 60000 ms
from automation_machine import ActionInstruction
step.add_action("timer_name", "Timer description", instruction=ActionInstruction.RTO, duration=60000)
ActionQualifier enum (default: ActionQualifier.N, keep timer running while step active)ActionInstruction.RTO60000 for 1 minute)Each RTO timer instance exposes the following child variables:
| Variable | Type | Description |
|---|---|---|
.IN |
BOOL | Input signal - timer counts while this is TRUE |
.Q |
BOOL | Output signal - becomes TRUE when .ET >= .PT |
.PT |
TIME | Preset time - the target accumulated duration |
.ET |
TIME | Elapsed time - the total accumulated time (retained across activations) |