UpdateTareOffset
The method can be used at runtime to perform manual taring. This means that the fOffset value (weight) is subtracted from the calculated output values. In addition, the function block outputs tLastTare and fCurrentTareOffset (= fCurrentTareOffset- fOffset) are updated.
Syntax
METHOD UpdateTareOffset := BOOL
VAR_INPUT
fOffset := LREAL; (* It corresponds to tare weight.*)
END_VAR
Inputs
Name | Type | Description |
---|---|---|
fOffset | LREAL | The new tare weight. |
Sample
stParamsScale: ST_WG_Scaling := (fRawLow := 0, fRawHigh := 1, fReferenceHigh := 1, fReferenceLow := 0);
fbScaling :FB_WG_Scaling:=(stConfig:=stParamsScale);
IF bUpdateTareOffset THEN
fbScaling.UpdateTareOffset (fOffset := 5.0);
bUpdateTareOffset := FALSE;
END_IF
Return value
Name | Type | Description |
---|---|---|
UpdateTareOffset | BOOL | TRUE if the method was executed successfully. |