TOF

TOF 1:

The function block TOF is a timer off-delay.

TOF 2: Inputs

VAR_INPUT
    IN : BOOL; (* starts timer with falling edge, resets timer with rising edge *) 
    PT : TIME; (* time to pass, before Q is set *)
END_VAR

Name

Type

Description

IN

BOOL

Starts the timer with a falling edge and resets the timer with a rising edge.

PT

TIME

Time elapsed before Q is set.

TOF 3: Outputs

VAR_OUTPUT
    Q  : BOOL; (* is FALSE, PT seconds after IN had a falling edge *)
    ET : TIME; (* elapsed time *)
END_VAR

Name

Type

Description

Q

BOOL

Q has a falling edge if the time specified in PT in milliseconds has elapsed.

ET

BOOL

If IN = TRUE, the outputs are TRUE or 0. As soon as IN = FALSE, the time in ET is incremented in milliseconds until the value reaches PT, then it remains constant. Q is FALSE, if IN = FALSE and ET = PT. Otherwise Q = TRUE.

Graph showing TOF over time:

TOF 4:

The function TOF requires 15 bytes of data

Requirements

Development environment

Target platform

PLC library to include

TwinCAT v3.0.0

PC or CX (x86)

Tc2_Standard