Calculate Range (Scaling) GX IEC Developer


1 Screenshot

About This File

A simple Function Block used to scale and unscale values.

Input is in Integer format.

Output is in Real format and also in Integer Format.

Min and Max input values specifies the range of the input signal.

Min and Max output values specifies the range of the output signal.

Example:

We have a 0-10V input module with a 0-6V sensor connected to it for pressure measurement.

The sensors pressure range is -1,2 to 4,5 Bar.

The Analog raw value is 0 to 16000.

The settings should then be:

"MinLimit_In" = 0

"MaxLimit_In" = 9600 (60% of max input)

"MinLimit_In" = -12 (Assuming we shall use Integer output and use one decimal)

"MaxLimit_Out" = 45 (Assuming we .........).