ST_WG_Weighing_AutoTare
Unterstruktur für die Konfigurationsstruktur ST_WG_Weighing. Wenn Parameter gesetzt werden, wirkt sich das ausschließlich in FB_WG_Weighing.fAutoTareOffset und FB_WG_Weighing.bNewAutoTareResult aus. Eine Instanz fbScaling von FB_WG_Scaling lässt sich automatisch tarieren, indem z. B. AutoTare(fbScaling, E_WG_AutoTareType.eEnd) aufgerufen wird.
(* This configure struct helps to find the tare weight during one measuring cycle. A measuring cycle starts when the FB_WG_Weighing.fWeight falls below fThresholdWeight and ends when it exceeds fThresholdWeight.
The tare weight will be updated (FB_WG_Weighing.fWeight with smallest FB_WG_Weighing.fStd) in FB_WG_Weighing.fAutoTareOffset until the measuring cycle ends. FB_WG_Scaling can be automatically tared by calling fbWeighing.AutoTare(fbScale, E_WG_AutoTareType.eEnd).
Optional parameters are ignored if they are zero. None of the parameters can be less than zero.*)
TYPE ST_WG_Weighing_AutoTare :
STRUCT
fThresholdWeight : LREAL := 20.0; (* Maximum value for the measured weight. This condition is fulfilled if FB_WG_Weighing.fWeight is smaller than or equal to fThresholdWeight. *)
nValidationSamples : UDINT := 50; (* Number of input values for which the other ST_WG_Weighing_AutoTare parameter conditions (fThresholdWeight, fMaxStd, fMaxWeightDeviation) must be fulfilled in order for FB_WG_Weighing.fAutoTareOffset to be updated. (optional, recommended). *)
fMaxStd : LREAL := 0.0; (* Upper limit for the standard deviation. This condition is fulfilled if FB_WG_Weighing.fStd is less than or equal to fMaxStd (optional, recommended). *)
fMaxWeightDeviation : LREAL := 0.0; (* Upper limit for the maximum weight deviation. This condition is fulfilled if FB_WG_Weighing.fMax - FB_WG_Weighing.fMin is less than or equal to fMaxWeightDeviation (optional, recommended). *)
END_STRUCT
END_TYPEfThresholdWeightist der Maximalwert für das gemessene Gewicht. Diese Bedingung ist erfüllt, wennFB_WG_Weighing.fWeightkleiner oder gleichfThresholdWeightist .nValidationSamplesist die Anzahl der Eingangswerte, für die die anderenST_WG_Weighing_AutoTare– Parameterbedingungen (fThresholdWeight, fMaxStd, fMaxWeightDeviation)erfüllt sein müssen, damitFB_WG_Weighing.fAutoTareOffsetgesetzt wird (optional, empfohlen).fMaxStdist die obere Grenze für die Standardabweichung. Diese Bedingung ist erfüllt, wennFB_WG_Weighing.fStdkleiner oder gleichfMaxStdist (optional, empfohlen).fMaxWeightDeviationist die obere Grenze für die maximale Gewichtsabweichung. Diese Bedingung ist erfüllt, wennFB_WG_Weighing.fMax - FB_WG_Weighing.fMinkleiner oder gleichfMaxWeightDeviationist (optional, empfohlen).

Fällt FB_WG_Weighing.fWeight unter fThresholdWeight, wird so lange nach dem Tara Gewicht mit dem kleinsten FB_WG_Weighing.fStd gesucht, bis FB_WG_Weighing.fWeight die fThresholdWeight Grenze wieder verlässt. Das Tara Gewicht wird frühestens nach nValidationSamples – Werten in FB_WG_Weighing.fWeight dargestellt.