ST_CM_SparseSpectrum_InitPars

Function block-specific structure with initialization parameters, which are analyzed when the function block is initialized.

TYPE ST_CM_SparseSpectrum_InitPars EXTENDS ST_CM_Object_InitPars :
STRUCT
    nWindowLength        : UDINT := 1000;                                         (* Length of analysis window. *)
    fSampleRate          : LREAL := 10000;                                        (* Sample rate in Hertz. *)
    nBins                : UDINT := 1;                                            (* Number of spectral bins. *)
    eSpectrumType        : E_CM_SpectrumType := E_CM_SpectrumType.eCM_Magnitude;  (* Type of spectrum, i.e. plain DFT, magnitude, power. *)
    eWindowType          : E_CM_WindowType := eCM_HannWindow;                     (* Window type. *)
    aWindowParameters    : T_CM_WindowParameters := [2.5,1,1,1,1];                (* Window parameters for specific windows, e.g. FlatTop. *)
    nOverlap             : UDINT := -1;                                           (* Size of overlap in samples. *)
    eScalingType         : E_CM_ScalingType := eCM_DiracScaling;                  (* Scaling type. *)
    bTransformToDecibel  : BOOL := FALSE;                                         (* Transform to decibel. *)
    fDecibelThreshold    : LREAL := cCM_MinArgLog10;                              (* Minimum argument of decadic logarithm for 64- bit IEEE 754 arithmetic. *)
    nChannels            : UDINT := 1;                                            (* Number of channels. *)
END_STRUCT
END_TYPE

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4022.25

PC or CX (x86, x64)

Tc3_CM_Base