ST_PMA_PowerValues_Period_InitPars

Function block-specific structure with initialization parameters which are evaluated when the function blocks FB_PMA_PowerValues_Period_1Ph and FB_PMA_PowerValues_Period_3Ph are initialized.

Syntax

Definition:

TYPE ST_PMA_PowerValues_Period_InitPars :
STRUCT
    nBufferLength              : UDINT := 200;   // Length of input buffer
    fSampleRate                : LREAL := 1000;  // in Hz
    fMinInputCurrent           : LREAL := 0.0;   // Minimal input of current (RMS) to calculate outputs
    nPeriods                   : UDINT := 1;     // Amount of signal periods to calculate outputs
    fNominalVoltage            : LREAL := 230.0; // Nominal voltage, required for PQF calculation
    fNominalFreq               : LREAL := 50.0;  // Nominal frequency, required for PQF calculation
    ePqfMode                   : E_PMA_PqfMode := E_PMA_PqfMode.Default; // Mode of PQF calculation
    uTimeLagCurrentTransformer : U_PMA_Timelag := (fTimeLag := 0);       // Timelag caused by inductivity of current transformer ( in s
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.

fMinInputCurrent

LREAL

Minimum input value (RMS) of the current. This prevents the calculation of input values that are too small.

nPeriods

UDINT

Number of signal periods for calculating the output values

fNominalVoltage

LREAL

Nominal voltage value. Is required for the calculation of the Power Quality Factor.

fNominalFreq

LREAL

Nominal frequency. Is required for the calculation of the Power Quality Factor.

ePqfMode

E_PMA_PqfMode

Mode for calculating the Power Quality Factor.

Default: Calculation of the Power Quality Factor with the frequency, the RMS value of the voltage as well as the THD of the voltage.

DefaultAndUnbalance: As Default, but in a three-phase system the voltage unbalance is also included in the calculation.

uTimeLagCurrentTransformer

U_PMA_Timelag

Here, the possible delay due to the inductance of the current transformer can be specified in seconds.

U_PMA_Timelag.fTimeLag: Identical for all phases

U_PMA_Timelag.aTimeLag: Individual per phase

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.0

PC or CX (x86, x64)

Tc3_PowerMonitoring