MC_AxUtiSlewRateLimitter_BkPlcMc (from V3.0)

MC_AxUtiSlewRateLimitter_BkPlcMc (from V3.0) 1:

The function block generates a rise-limited ramp.

MC_AxUtiSlewRateLimitter_BkPlcMc (from V3.0) 2: Inputs

VAR_INPUT
    fInput:       LREAL:=0.0;
    fCycletime:   DINT:=0;
    fMaxRate:     DINT:=0;
END_VAR

Name

Type

Description

fInput

LREAL

The raw value of the parameter to be filtered.

fCycletime

DINT

[s] The cycle time of the calling PLC task in seconds.

fMaxRate

DINT

The magnitude of the maximum permitted rate of change at the output as change per second.

MC_AxUtiSlewRateLimitter_BkPlcMc (from V3.0) 3: Outputs

VAR_OUTPUT
    fOutput:      LREAL:=0.0;
    bError:       BOOL:=FALSE;
    nErrorId:     UDINT:=0;
END_VAR

Name

Type

Description

fOutput

LREAL

[1/s] The filtered value.

bError

BOOL

This output indicates problems with the transferred parameters.

nErrorId

UDINT

In the event of an error, coded error information is output here.

Behavior of the function block

With each call the function block checks the transferred values for fCycletime and fMaxRate. If the values are incorrect, the system responds with bError and coded information in nErrorId. Otherwise, the difference between Input and Output is determined with each call. If the magnitude of this difference is less than or equal to fMaxRate * fCycletime, the value of Input is used directly as fOutput. Otherwise, fOutput is changed by fMaxRate * fCycletime. The sign is selected automatically.

MC_AxUtiSlewRateLimitter_BkPlcMc (from V3.0) 4:

The value for fCycletime must be ≥ 0.001. Negative values are not permitted for fMaxRate.

Input will usually be a value, which is determined and filtered based on the cycle of the axis blocks. Axis_Ref_BkPlcMc.ST_TcHydAxParam.fCycletime can be used for fCycletime here.