ST_PMA_Scaling_InitPars
Function block-specific structure with initialization parameters which are evaluated when the function block FB_PMA_Scaling is initialized.
Syntax
Definition:
TYPE ST_PMA_Scaling_InitPars :
STRUCT
nOversamples : UDINT := 10; // Oversampling factor
nResolutionVoltage : UDINT := (1..32); // in bit
fMaxVoltage : LREAL; // Max input amplitude
fOffsetVoltage : LREAL := 0; // Output = (input * gain) + offset
fGainVoltage : LREAL := 1; // ||
nResolutionCurrent : UDINT := (1..32); // in bit
fMaxCurrent : LREAL; // Max input amplitude
fOffsetCurrent : LREAL := 0; // Output = (input * gain) + offset
fGainCurrent : LREAL := 1; // ||
fFactorCurrentTransformer : LREAL := 1; // Factor of current transformer (input / output)
END_STRUCT
END_TYPE
Parameter
Name |
Type |
Parameter |
---|---|---|
nOversamples |
UDINT |
Oversampling factor |
nResolutionVoltage |
UDINT |
Resolution of the voltage in bits. Range of values: 0-32 |
fMaxVoltage |
LREAL |
Indicated the maximum amplitude of the input voltage. |
fOffsetVoltage |
LREAL |
Indicates a user-defined offset for the voltage scaling. |
fGainVoltage |
UDINT |
Indicates a user-defined gain factor for the voltage scaling. |
nResolutionCurrent |
LREAL |
Resolution of the current in bits. Range of values: 0-32 |
fMaxCurrent |
LREAL |
Indicates the maximum amplitude of the input current. |
fOffsetCurrent |
LREAL |
Indicates a user-defined offset for the current scaling. |
fGainCurrent |
LREAL |
Specifies a user-defined gain factor for the current scaling. |
fFactorCurrentTransformer |
LREAL |
Current transformer factor. This is calculated from the input current and output current. |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v3.1.4024.0 | PC or CX (x86, x64) | Tc3_PowerMonitoring |