MC_AxUtiPT1_BkPlcMc

MC_AxUtiPT1_BkPlcMc 1:
MC_AxUtiPT1_BkPlcMc 2:

Available from version 3.0

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

MC_AxUtiPT1_BkPlcMc 3: 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 4: 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.