ST_WG_Weighing_AutoTare

Substructure for the configuration structure ST_WG_Weighing. If parameters are set, this only affects FB_WG_Weighing.fAutoTareOffset and FB_WG_Weighing.bNewAutoTareResult. An instance of fbScaling from FB_WG_Scaling can be automatically tared, e.g. by calling AutoTare(fbScaling, E_WG_AutoTareType.eEnd).

(* 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_TYPE
ST_WG_Weighing_AutoTare 1:

If FB_WG_Weighing.fWeight falls below fThresholdWeight, the tare weight with the lowest FB_WG_Weighing.fStd is searched for until FB_WG_Weighing.fWeight leaves the fThresholdWeight limit again. The tare weight is displayed at the earliest after nValidationSamples values in FB_WG_Weighing.fWeight.