FB_BA_RampLmt

Ramp limitation

FB_BA_RampLmt 1:

Functional description

The function block limits the increase or decrease speed of an input signal.
An increase of rIn results in the output rOut to be limited to the slope of (rHi-rLo)/udiTiUp.
A decrease of rIn results in the output rOut to be limited to the slope of (rHi-rLo)/udiTiDwn.

FB_BA_RampLmt 2:

Inputs/outputs

VAR_INPUT

bEn         : BOOL;
bEnRamp     : BOOL;
rIn         : REAL;
rHi         : REAL;
rLo         : REAL;
udiTiUp     : UDINT;
udiTiDwn    : UDINT;

bEn: enable function block if FALSE, then rOut = 0.0

bEnRamp: enable ramp limit, if FALSE, then rOut = rIn.

rIn: input value of the ramp function

rHi: upper interpolation point for calculating the ramps.

rLo: lower interpolation point for calculating the ramps. rHi must be greater than rLo, otherwise an error is output!

udiTiUp: rise time [s]

udiTiDwn: fall time [s]

VAR_OUTPUT

rOut        : REAL;
bErr        : BOOL;
udiErrId    : UDINT;
udiErrArg   : UDINT;

rOut: Output signal, slope-limited through the ramps

bErr: This output is switched to TRUE if the parameters entered are erroneous.

udiErrId / udiErrArg: Contains the error number and the error argument. See Error codes.

Requirements

Development environment

Target system

required library

required supplement

TwinCAT 2.11 R3/x64

PC/CX

TcBA library from V1.0.0

TS8040 | TwinCAT Building Automation from V1.0.0