F_BA_RemSecsTone

The function F_BA_RemSecsTon of return type UDINT displays the elapsed time of a TON function (switch-on delay) in seconds.
The switch-on delay to be considered must be applied to input tonTimer.
The function block counts down whole seconds when the switch-on delay is activated. If the function block under consideration is parameterized with 10 s at the input tonTimer, for example, the function F_BA_RemSecsTon 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-on delay is not active, the following behavior applies:
- if input IN and output Q of the TON function block under consideration are FALSE (countdown pending), the function F_BA_RemSecsTon is fixed at the programmed time PT of the TON function block in seconds. It is rounded down to the full second.
- if the IN input and the Q output of the TON function block under consideration are TRUE (countdown has expired), the function F_BA_RemSecsTon is fixed at "0".
Syntax
FUNCTION F_BA_RemSecsTon : UDINT
VAR_INPUT
tonTimer : TON;
END_VAR
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.35 | Tc3_XBA from v5.3.0.0 |