F_Scale

F_Scale 1:

A raw analog value is scaled to the specified measuring range and returned as the function value. If the raw value extends beyond the upper or lower measuring range, the corresponding limit value is output. There must be a difference of at least 0.01 between the upper and lower limit values for the raw data. If this is not the case, the lower limit value is output.

F_Scale 2:

FUNCTION F_Scale: LREAL

VAR_INPUT

fRawData                 : LREAL;
fRawDataLowerOffLimit    : LREAL;
fRawDataUpperOffLimit    : LREAL;
fScaleDataLowerOffLimit  : LREAL;
fScaleDataUpperOffLimit  : LREAL;

fRawData: raw value.

fRawDataLowerOffLimit: Lower limit for raw value.

fRawDataUpperOffLimit: Upper limit for raw value.

fScaleDataLowerOffLimit: Lower limit of scaled measured value.

fScaleDataUpperOffLimit: Upper limit of scaled measured value.

Requirements

Development environment

Required PLC library

TwinCAT from v3.1.4020.32

Tc2_BABasic from v3.1.0.0