FB_PMA_Scaling

The function block FB_PMA_Scaling is used for scaling raw values. The raw values can be scaled individually or as an array, for example as oversampling values. In addition, it is possible to use single-phase and three-phase input signals.

Alternatively, the specialized function blocks FB_PMA_Scaling_EL3773 can be used for inputs of the EL3773 EtherCAT Terminal and FB_PMA_Scaling_EL3783 for inputs of the EL3783 EtherCAT Terminal.

Syntax

Definition:

FUNCTION BLOCK FB_PMA_Scaling
VAR_INPUT
    stInitPars       : ST_PMA_Scaling_InitPars
END_VAR
VAR_OUTPUT
    bError           : BOOL;
    ipResultMessage  : I_TcMessage;
    bNewResult       : BOOL;
END_VAR

FB_PMA_Scaling 1: Inputs

The input parameters of this function block represent initialization parameters and have to be assigned during the declaration of the function block instance (alternatively: Init method). They may only be assigned once. A change at runtime is possible by calling the Init method again.

Name

Type

Description

stInitPars

ST_PMA_Scaling_InitPars

Function block-specific structure with initialization parameters

FB_PMA_Scaling 2: Outputs

Name

Type

Description

bError

BOOL

TRUE if an error occurs.

ipResultMessage

I_TcMessage

The interface offers detailed information about the return value.

bNewResult

BOOL

TRUE when new results were calculated.

FB_PMA_Scaling 3: Methods

Methods can be used to scale different systems (single-phase or three-phase) and different resolutions (16-bit or 32-bit).

Name

Description

Call_1Ph_16Bit

The method is called to scale the 16-bit input data of type INT according to the configured parameters.

Call_1Ph_32Bit

The method is called to scale the 32-bit input data of type DINT according to the configured parameters.

Call_3Ph_16Bit

The method is called to scale the 16-bit input data of type INT according to the configured parameters.

Call_3Ph_32Bit

The method is called to scale the 32-bit input data of type DINT according to the configured parameters.

Init

Alternative to the function block initialization

Reconfigure

The method is called in order to reconfigure the function block during the runtime.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4024.0

PC or CX (x86, x64)

Tc3_PowerMonitoring