TONOFF (time-delay, on, off)

The TONOFF instruction delays turning on an output on a true rung, and then delays turning off the output on the false rung.
Operation details: If the EN parameter is used with TONOFF, the timer starts incrementing when EN is set to TRUE, and continues to increment even if EN is set to FALSE.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
TONOFF
TONOFF
TONOFF parameters
Parameter
Parameter type
Data type
Description
IN
Input
BOOL
Input control.
  • TRUE: Rising edge detected (IN turns from 0 to 1):
    • Start the On-delay timer (PT).
    • If Programmed Off--delay time (PTOF) is not elapsed, restart the On-delay (PT) timer.
  • FALSE: Falling edge detected (IN turns from 1 to 0):
    • If Programmed On-delay time (PT) is not elapsed, stop PT timer and reset ET.
    • If Programmed On-delay time (PT) is elapsed, the start the Off-delay timer (PTOF).
PT
Input
TIME
The on-delay time setting defined using the Time data type.
PTOF
Input
TIME
The off-delay time setting defined using the Time data type.
Q
Output
BOOL
TRUE: The Programmed On-delay time is elapsed and Programmed Off-delay time is not elapsed.
ET
Output
TIME
Current elapsed time. Possible values range from 0ms through 1193h2m47s294ms.
If the Programmed On-delay time is elapsed and the Off-delay timer is not starting, the elapsed time (ET) remains at the on-delay (PT) value. If the Programmed Off-delay time is elapsed and the Off-delay timer is not starting, the elapsed time (ET) remains at the off-delay (PTOF) value until the rising edge occurs again.

TONOFF examples

TONOFF function block diagram example
TONOFF function block diagram example
TONOFF ladder diagram example
TONOFF ladder diagram example
TONOFF structured text example
TONOFF structured text example
Results
Results
Results
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal