PulseR

PulseR (FB)

FUNCTION_BLOCK PulseR

Short description

Edge-triggered pulse generation with adjustable duration and reset capability.

Representation

Interfaces

Inputs

Name
Data type
Value range
Initial value
Function

xIN

BOOL

Binary input (FALSE > TRUE)

tPT

TIME

T#1s

Duration of the output pulse in s

xReset

BOOL

Binary reset input (FALSE > TRUE)

Outputs

Name
Data type
Value range
Initial value
Function

xQ

BOOL

Pulse output (FALSE = Off, TRUE = On)

tET

TIME

0 … tPT

Current duration of the pulse at xQ in s

Setpoints / parameters

Name
Data type
Value range
Initial value
Function

xTest

BOOL

FALSE

Binary test input (FALSE > TRUE)

Function description

General

At the pulse output xQ is after each rising edge (FALSE > TRUE) at the binary input xIN and/or at the setpoint / parameter xTest a pulse with a duration tPT generates (conditions: xReset = FALSE and no falling edge at the input xIN). Every rising edge (FALSE > TRUE) at the reset input xReset resets the pulse output xQ immediately resets to FALSE. Every falling edge (TRUE > FALSE) at the binary input xIN resets the pulse output xQ immediately (= FALSE). The edge detection (FALSE > TRUE) on the inputs xIN or xTest has higher priority compared to the edge detection at the inputs xReset (FALSE > TRUE) respectively xIN (TRUE > FALSE). This results in, despite simultaneous edge detection, a pulse with a duration tPT is generated at the output xQ being 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 at xQ (0.0 - tPT). When the pulse output is inactive xQ (= FALSE) the value T#0s is always displayed.

CODESYS

InOut:

Scope
Name
Type
Initial

Input

xIN

BOOL

Input

tPT

TIME

TIME#1s0ms

Input

xReset

BOOL

Input Const

xTest

BOOL

FALSE

Output

xQ

BOOL

Output

tET

TIME

Last updated