PulseShift

PulseShift (FB)

FUNCTION_BLOCK PulseShift

Short description

Edge-controlled, delayed pulse generation with adjustable pulse duration.

Representation

Interfaces

Inputs

Name
Data type
Value range
Initial value
Function

xIN

BOOL

Binary input

tShift

TIME

T#1s

Delay time

tPT

TIME

T#1s

Duration of the output pulse

Outputs

Name
Data type
Value range
Initial value
Function

xQ

BOOL

Pulse output

tET

TIME

Time difference between the target duration and the duration of the pulse at xQ

Set values / parameters

Name
Data type
Value range
Initial value
Function

xTest

BOOL

FALSE

Test input to trigger the pulse

Function description

General

At the pulse output xQ is generated after a positive edge at the binary input xIN and a subsequent delay time tShift with a duration of tPT is generated. Alternatively, pulse generation without delay can also be triggered by the setpoint / parameter xTest is triggered.

Time output tET

When the pulse output is active xQ the time difference between the target duration tPT and the duration of the pulse at xQ is displayed. When the pulse output is inactive, xQ the value T#0s is always shown.

CODESYS

InOut:

Scope
Name
Type
Initial

Input

xIN

BOOL

Input

tShift

TIME

TIME#1s0ms

Input

tPT

TIME

TIME#1s0ms

Input Const

xTest

BOOL

FALSE

Output

xQ

BOOL

Output

tET

TIME

Last updated