Configure

This method can be used at runtime to initially configure the instance of a filter (if it was not already configured in the declaration) or to reconfigure it.

If a weighing instance is not configured, the methods Call() and Reset()cannot be used.

Syntax

METHOD Configure : BOOL
VAR_INPUT
    stConfig : ST_WG_Scaling;
END_VAR

Configure 1: Inputs

Name

Type

Description

stConfig

ST_WG_Scaling

Structure for configuring the filter behavior

Sample

(*Declaration without configuration*)
fbScaling : FB_WG_Scaling();
(* initial configuration of fbScaling *)
IF bInit THEN
    bSucceed := fbScaling.Configure(stConfig := stParams);
    bInit    := FALSE
END_IF

(* reconfigure fbScaling on bReconfigure = TRUE *)
IF bReconfigure THEN
    stParams.fRawHigh:= 10; (*change fRawHigh*)
    bSucceed         := fbScaling.Configure(stConfig := stParams);
    bReconfigure     := FALSE;
END_IF

Configure 2: Return value

Name

Type

Description

Configure

BOOL

TRUE if the weighing instance was configured successfully.