ST_CM_ZoomFFT_InitPars
Function block-specific structure with initialization parameters, which are analyzed when the function block is initialized.
TYPE ST_CM_ZoomFFT_InitPars EXTENDS ST_CM_Object_InitPars :
STRUCT
nFFT_Length : UDINT := 2048; (* Length of FFT. *)
fSampleRate : LREAL := 10000.0; (* Sample rate in Hertz. *)
fCenter : LREAL := 200.0; (* Center frequency of band in Hertz. *)
nDecimationFactor : UDINT := 16; (* FFT decimation factor. *)
nOrder : UDINT := 4; (* Order of lowpass filter in range [1 .. 20]. *)
nChannels : UDINT := 1; (* Number of channels. *)
END_STRUCT
END_TYPE
nFFT_Length
is the length of the FFT. It must be greater than one and an integral power of two.fSampleRate
Sampling rate of the incoming time signal. The value is used for the scaling of the result in Hz.fCenter
is the center of the frequency band to be used. The bandwidth depends on the decimation factor.nDecimationFactor
is the decimation factor of the applied low-pass filter after centering the input signal. The value must be a power of two to ensure integer division when downsampling.nOrder
defines the order of the IIR filter used.nChannels
defines the number of independent channels. This must be greater than zero.
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4022.25 | PC or CX (x86, x64) | Tc3_CM_Base |