CallEx
The method is called in each cycle to execute the calculations from the input buffer when new data is present.
The function block waits for input data if the method outputs neither new results nor an error. This is a regular behavior in the process of the analysis chain.
In contrast to the Call method, the CallEx method collects a variable number of results from the spectrum calculation and calculates the quantiles only afterwards. This may be required to minimize CPU load.
Syntax
METHOD CallEx : BOOL
VAR_INPUT
nAppendData : UDINT;
bResetData : BOOL;
pMagnitudeSpectrum_U : POINTER TO LREAL;
pMagnitudeSpectrum_I : POINTER TO LREAL;
nMagnitudeSpectrumSize : UDINT
pSpectrumQuantiles_U : POINTER TO LREAL;
pSpectrumQuantiles_I : POINTER TO LREAL;
nSpectrumQuantilesSize : UDINT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
nAppendData |
UDINT |
Number of spectra to be calculated until the quantile is calculated. A value of 1 means that the quantiles are calculated after each result of the spectrum calculation. |
bResetData |
BOOL |
Automatic resetting of records after each quantile calculation |
pMagnitudeSpectrum_U |
POINTER TO LREAL |
Pointer to an array of the type LREAL with the dimension FFT length/2+1. If the spectrum is not to be output, the input can be set to 0. |
pMagnitudeSpectrum_I |
POINTER TO LREAL |
Pointer to an array of the type LREAL with the dimension FFT length/2+1. If the spectrum is not to be output, the input can be set to 0. |
nMagnitudeSpectrumSize |
UDINT |
Indicates the size of the output array of a spectrum. |
pSpectrumQuantiles_U |
POINTER TO LREAL |
Pointer to an array of the type LREAL with the dimension FFT length/2+1 x quantile. If these values are not to be output, the input can be set to 0. |
pSpectrumQuantiles_I |
POINTER TO LREAL |
Pointer to an array of the type LREAL with the dimension FFT length/2+1 x quantile. If these values are not to be output, the input can be set to 0. |
nSpectrumQuantilesSize |
UDINT |
Indicates the size of the output array for a quantile calculation. |
Return value
Name |
Type |
Description |
---|---|---|
CallEx |
BOOL |
Indicates whether the method was executed successfully. Further information is provided in the Event interface of the function block. |