F_BA_RemSecsTp

The function F_BA_RemSecsTp of return type UDINT displays the elapsed time of a TP function (pulse function) in seconds.
The function block counts down whole seconds when the pulse function is activated. If the function block under consideration at input tpTimer 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 pulse function under consideration is not active, the following behavior applies:
- if input IN and output Q of the pulse function under consideration are FALSE (countdown pending), the function F_BA_RemSecsTp is fixed at the programmed time PT of the TP function block in seconds. It is rounded down to the full second.
- if the input IN of the pulse function under consideration is TRUE and the output Q is already FALSE (countdown has expired), the F_BA_RemSecsTof function is fixed at "0".
Syntax
FUNCTION F_BA_RemSecsTp : UDINT
VAR_INPUT
tpTimer : TP;
END_VAR
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.35 | Tc3_XBA from v5.3.0.0 |