ST_PMA_Harmonics_Period_InitPars
Function block-specific structure with initialization parameters that is evaluated when the function blocks FB_PMA_Harmonics_Period_1Ph and FB_PMA_Harmonics_Period_3Ph are initialized.
Syntax
Definition:
TYPE ST_PMA_Harmonics_Period_InitPars :
STRUCT
nBufferLength : UDINT := 200; // Length of input buffer
fSampleRate : LREAL := 1000; // in Hz
nNumHarmonics : UDINT := 20; // Number of harmonics
nPeriods : UDINT := 10; // Amount of signal periods to calculate outputs
bTransformToPercent : BOOL := TRUE; // transform results to percent (1st harmonic=100%)
END_STRUCT
END_TYPE
Parameters
Name | Type | Parameters |
---|---|---|
nBufferLength | UDINT | Length of the input buffer |
fSampleRate | LREAL | Indicates the sampling rate (samples per second) of the input signal. |
nNumHarmonics | UDINT | Number of harmonics to be calculated |
nPeriods | UDINT | Number of signal periods for calculating the output values. |
bTransformToPercent | BOOL | Boolean value indicating whether the result should be output in percent. The first harmonic corresponds to 100%. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x86, x64) | Tc3_PowerMonitoring |