AKF_TV: Extended pulse
Original instructions
Function description
The derived function block is used to generate an extended pulse.
The pulse duration comprises a time base ZB and a factor SW. The pulse duration is calculated from ZB x SW.
The actual value is displayed at the TIW output and is calculated according to the following formula: TIW = expired time / ZB
With a 0 -> 1 edge at the IN input, the pulse duration is transferred to the TSW output, the internal timer is started and the Q output is set to "1".
The Q output remains at "1", independent of IN, until TIW equals TSW. The Q output is now set to "0".
With a 0 -> 1 edge at the R input the internal timer is reset and the Q output is set to "0".
EN and ENO can be configured as additional parameters.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
CAL AKF_TV_Instance (IN:=StartingPulse, ZB:=TimeBaseOfPulse, 
    SW:=FactorOfPulse, R:=ResetInput, Q=>Output,
    TIW=>InternalTime, TSW=>TimerSetpointValue)
Representation in ST
Representation:
AKF_TV_Instance (IN:=StartingPulse, ZB:=TimeBaseOfPulse,
    SW:=FactorOfPulse, R:=ResetInput, Q=>Output,
    TIW=>InternalTime, TSW=>TimerSetpointValue) ;
Parameter description
Description of input parameters:
Parameter
Data type
Description
IN
Start pulse
ZB
Time basis of the pulse
SW
Pulse factor
R
BOOL
Reset input
Description of output parameters:
Parameter
Data type
Description
Q
BOOL
Output
TIW
INT
internal time (actual timer value)
TSW
INT
Timer setpoint at time of 0 -> 1 edge at IN
Timing diagram
Timing diagram for extended pulse TV:
(1) 
If IN becomes "1", Q becomes "1", and the internal timer (TIW) is started.
(2) 
If the internal timer (TIW) reaches the value of TSW, Q becomes "0".
(3) 
If IN becomes "1" again, the internal timer is restarted and Q becomes "1".
(4) 
If IN becomes "1" again, the internal timer is restarted and Q remains "1".
(5) 
If R becomes "1", Q becomes "0", independent of IN, and the internal timer is stopped/reset.
(6) 
If IN becomes "1" and R is "1", Q remains at "0" and the internal timer is not started.
Runtime error
For a list of all block error codes and values, see Extension/Compatibility.