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
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 |
Function block-specific structure with initialization parameters |
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. |
Methods
Methods can be used to scale different systems (single-phase or three-phase) and different resolutions (16-bit or 32-bit).
Name |
Description |
---|---|
The method is called to scale the 16-bit input data of type INT according to the configured parameters. | |
The method is called to scale the 32-bit input data of type DINT according to the configured parameters. | |
The method is called to scale the 16-bit input data of type INT according to the configured parameters. | |
The method is called to scale the 32-bit input data of type DINT according to the configured parameters. | |
Alternative to the function block initialization | |
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 |