ST_WG_ComboFilter
Configuration structure for the function block FB_WG_ComboFilter.
(* Optional parameters are ignored if they are zero.*)
TYPE ST_WG_ComboFilter :
STRUCT
nOrder : UDINT := 6; (* Order has to be between one and ten. *)
fCutoff : LREAL := 10.0; (* Cutoff frequency [Hz] has to be greater than zero and smaller or equal than fSamplingrate/2. *)
fSamplingRate : LREAL := 1000.0; (* Sampling rate [Hz] has to be greater than zero. *)
nSamplesToFilter : UDINT := 200; (* Number of samples must be greater than zero. It corresponds to the window size of the moving average filter (optional). *)
fNotchFrequency : LREAL := 0.0; (* Notch frequency [Hz] has to be greater than zero and smaller or equal than fSamplingrate/2. The quality factor Q has a default value of 30.0 (optional). *)
bReset : BOOL := TRUE; (* Reset memory, if bReset = TRUE *)
END_STRUCT
END_TYPE
nOrder
is the filter order (1-10).fCutoff
is the cut-off frequency in Hz (greater than 0 and less thanfSamplingRate
/2)fSamplingRate
is the sampling rate fs in Hz.nSamplesToFilter
is the number of samples (greater than 0) to form the moving average (often referred to as the window size).- fNotchFrequency is the notch frequency in Hz (greater than 0 and less than
fSamplingRate
/2) bReset
is a Boolean parameter that specifies whether the internal past values should be reset on reconfiguration.