4. Configuration
196
// Actions executed at the end of the counting
IF (TOF_RET.Q = FALSE) THEN
bStart := TRUE;
END_IF
TON_RET
The function block TON_RET implements a time delay to enable an output. When the input IN has
its state changed from FALSE to TRUE (rising edge), the specified time PT will be counted and the
Q output will be driven to TRUE at the end of it. When input IN is in logic level 0 (FALSE), output
Q remains in the same state (FALSE), even if it happens in the middle of the counting process. The
PT time can be changed during the counting as the block takes the new value if the counting has not
finished. Figure 4-64 depicts the TON_RET function block and Figure 4-65 shows its graphic
behavior.
Figure 4-64. TON_RET Function Block
Input Parameters
Type
Description
IN
BOOL
This variable, when receives a rising edge, enables the
block counting.
PT
TIME
This variable specifies the block counting limit (time
delay).
Table 4-139. Input Parameters
Output Parameters
Type
Description
Q
BOOL
This variable executes a rising edge as the PT variable
(time delay) reaches its maximum value.
ET
TIME
This variable shows the current time delay.
Table 4-140. Output Parameters
Figure 4-65. TON_RET Function Block Graphic Behavior