F_CM_ApplySpectralScaling
This function performs a scaling of spectral values. See section: Scaling of spectra
FUNCTION F_CM_ApplySpectralScaling : HRESULT
VAR_INPUT
eScalingType : E_CM_ScalingType; (* Scaling type. *)
nFFT_Length : UDINT; (* Length of FFT. *)
nOrder : UDINT; (* Order of spectrum: 1 = magnitude, 2 = power. *)
fSampleRate : LREAL; (* Sample rate in Hertz. *)
bTransformToDecibel : BOOL; (* Transform to decibel. *)
fDecibelThreshold : LREAL; (* Minimum argument of decadic logarithm for 64- bit IEEE 754 arithmetic. *)
nWindowLength : UDINT; (* Length of analysis window. *)
pWindow : POINTER TO POINTER TO LREAL; (* Pointer to window data. *)
nResultLength : UDINT; (* Length of spectrum, i.e. nFFT_Length or nFFT_Length / 2 + 1. *)
pSpectrum : POINTER TO POINTER TO LREAL; (* Pointer to spectrum. *)
END_VAR
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4022.25 | PC or CX (x86, x64) | Tc3_CM_Base |