TON
The function block TON is an on-delay timer.
Inputs
VAR_INPUT
IN : BOOL; (* starts timer with rising edge, resets timer with falling edge *)
PT : TIME; (* time to pass, before Q is set *)
END_VAR
Name | Type | Description |
---|---|---|
IN | BOOL | Starts the timer with a rising edge and resets the timer with a falling edge. |
PT | TIME | Time elapsed before Q is set. |
Outputs
VAR_OUTPUT
Q : BOOL; (* is TRUE, PT seconds after IN had a rising edge *)
ET : TIME; (* elapsed time *)
END_VAR
Name | Type | Description |
---|---|---|
Q | BOOL | Q has a rising edge when the time specified in PT in milliseconds has elapsed. |
ET | BOOL | If IN = FALSE, the outputs are FALSE or 0. As soon as IN = TRUE, the time in ET is incremented in milliseconds until the value reaches PT, then it remains constant. Q is TRUE, if IN = TRUE and ET = PT. Otherwise Q = FALSE. |
Graph showing TON over time:
The function TON requires 15 bytes of data
Requirements
Development environment | Target platform | PLC library to include |
---|---|---|
TwinCAT v3.0.0 | PC or CX (x86) | Tc2_Standard |