PulseR
PulseR (FB)
PulseR (FB)FUNCTION_BLOCK PulseR
Short description
Edge-controlled pulse generation with adjustable duration and reset capability.
Representation

Interfaces
Inputs
xIN
BOOL
Binary input (FALSE > TRUE)
tPT
TIME
T#1s
Pulse output duration in s
xReset
BOOL
Binary reset input (FALSE > TRUE)
Outputs
xQ
BOOL
Pulse output (FALSE = Off, TRUE = On)
tET
TIME
0 … tPT
Current pulse duration at xQ in s
Set values / parameters
xTest
BOOL
FALSE
Binary test input (FALSE > TRUE)
Function description
General
At the pulse output xQ a pulse is generated after every rising edge (FALSE > TRUE) at the binary input xIN and/or at the setpoint / parameter xTest with a duration of tPT generates (prerequisites: xReset = FALSE and no falling edge on the input xIN). Each rising edge (FALSE > TRUE) on the reset input xReset immediately resets the pulse output xQ immediately resets (= FALSE). Each falling edge (TRUE > FALSE) on the binary input xIN immediately resets the pulse output xQ immediately resets (= FALSE). The edge detection (FALSE > TRUE) on the inputs xIN or xTest has priority over the edge detection on the inputs xReset (FALSE > TRUE) or xIN (TRUE > FALSE) has a higher priority. This results in a pulse with a duration being generated despite simultaneous edge detections. tPT is generated at the output. xQ is generated. The setpoint/parameter xTest is cyclically deactivated (= FALSE).

Time output tET
When the pulse output is active xQ (= TRUE) the current duration of the pulse is shown on xQ (0.0 - tPT ) is displayed. When the pulse output is inactive xQ (= FALSE) the value T#0s is always displayed.
CODESYS
InOut:
Input
xIN
BOOL
Input
tPT
TIME
TIME#1s0ms
Input
xReset
BOOL
Input Const
xTest
BOOL
FALSE
Output
xQ
BOOL
Output
tET
TIME
Last updated

