Attention
IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.
TON¶
On-delay timer. Output Q becomes TRUE after input IN has been
TRUE for at least the preset time PT.
IEC 61131-3 |
Section 2.5.2.3.3 |
Support |
Not yet supported |
Inputs¶
Name |
Type |
Description |
|---|---|---|
|
|
Timer enable input |
|
|
Preset time |
Outputs¶
Name |
Type |
Description |
|---|---|---|
|
|
Timer output (TRUE when elapsed time >= PT) |
|
|
Elapsed time |
Behavior¶
When IN transitions to TRUE, the elapsed time ET begins counting
from T#0s. When ET reaches the preset time PT, the output Q
becomes TRUE. If IN returns to FALSE before ET reaches PT,
both ET and Q are reset.
Example¶
VAR
timer1 : TON;
start : BOOL;
done : BOOL;
END_VAR
timer1(IN := start, PT := T#5s);
done := timer1.Q;