MC_AxUtiPT1_BkPlcMc (from V3.0)

MC_AxUtiPT1_BkPlcMc (from V3.0) 1:

The function block calculates a first-order low-pass.

MC_AxUtiPT1_BkPlcMc (from V3.0) 2: Inputs

VAR_INPUT
     fInput:       LREAL:=0.0;
     fCycletime:   LREAL:=0.001;
     fT0:          LREAL:=1.0;
END_VAR

Name

Type

Description

fInput

LREAL

The raw value of the parameter to be filtered.

fCycletime

LREAL

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

fT0

LREAL

[s] The filter time constant.

MC_AxUtiPT1_BkPlcMc (from V3.0) 3: Outputs

VAR_OUTPUT
     fOutput:      LREAL;
     bError:       BOOL;
     nErrorId:     UDINT;
END_VAR

Name

Type

Description

fOutput

LREAL

The filtered value.

bError

BOOL

This output indicates problems with the transferred parameters.

nErrorId

UDINT

In the event of an error, coded information about the type of problem is reported here.

Behavior of the function block

With each call the function block checks the transferred parameters. If an invalid value is detected, the function block responds with bError and a corresponding value in nErrorId. Otherwise, the internal variables are updated with fInput, and the filtered value is returned as fOutput.