F_BA_RemSecsTof

The function F_BA_RemSecsTof of return type UDINT displays the elapsed time of a TOF function block (switch-off delay) in seconds.
The switch-off delay to be considered must be applied to the input tofTimer.
The function block counts down whole seconds when the switch-off delay is activated. If the function block under consideration at input tofTimer is parameterized with 10 s, for example, the function F_BA_RemSecsTof counts down 10-9-8 etc. second by second.
If the parameterized time is not specified in whole seconds, for example 10.6 s, the function initially has the value "10" for 1.6 s.
As long as the switch-off delay is not active, the following behavior applies:
- if input IN is TRUE and output Q is still FALSE (countdown pending) on the TOF function block under consideration, the F_BA_RemSecsTof function is fixed at the programmed time PT of the TOF function block in seconds. It is rounded down to the full second.
- if the IN input and the Q output of the TOF function block under consideration are FALSE (countdown has expired), the function F_BA_RemSecsTof is fixed at "0".
Syntax
FUNCTION F_BA_RemSecsTof : UDINT
VAR_INPUT
tofTimer : TOF;
END_VAR
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.35 | Tc3_XBA from v5.3.0.0 |