Call

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.

Syntax

METHOD Call : BOOL
VAR_INPUT
    fFreq              : LREAL;
    pHarmonicsRMS_UL1  : POINTER TO LREAL;
    pHarmonicsRMS_UL2  : POINTER TO LREAL;
    pHarmonicsRMS_UL3  : POINTER TO LREAL;
    pHarmonicsRMS_IL1  : POINTER TO LREAL;
    pHarmonicsRMS_IL2  : POINTER TO LREAL;
    pHarmonicsRMS_IL3  : POINTER TO LREAL;
    nHarmonicsRMSSize  : UDINT;
    bResetStatistics   : BOOL;
END_VAR

Call 1: Inputs

Name

Type

Description

fFreq

LREAL

Current frequency of the input signal. Is used to determine the length of the period at the beginning of a period. The output of the function block FB_PMA_Frequency_Period_3Ph can be used.

pHarmonicsRMS_UL1 .. UL3

POINTER TO LREAL

Pointer to an array of type LREAL with dimension: number of harmonics. If the individual harmonics are not to be output, the input can be set to 0.

pHarmonicsRMS_IL1 .. IL3

POINTER TO LREAL

Pointer to an array of type LREAL with dimension: number of harmonics. If the individual harmonics are not to be output, the input can be set to 0.

nHarmonicsRMSSize

UDINT

Indicates the size of an output array for the harmonics.

bResetStatistics

BOOL

TRUE resets the minimum and maximum values of the outputs.

Call 2: Return value

Name

Type

Description

Call

BOOL

Indicates whether the method was executed successfully. Further information is provided in the Event interface of the function block.