|
Instructions You can use the SCALE_ X "Scale" and NORM_X "Normalize" converters to scale analog values. These blocks are located in STEP 7 V11 in the "Statements" palette under "Converters". A detailed description of the function and parameterization is available in the STEP 7 V11 Online Help. To obtain the Online Help for a block, mark the block concerned (SCALE_X, for example) and press the "F1" key.
In the following examples it is assumed that the measuring ranges are unipolar. The integer input value is then between 0 and 27648.
Example 1
The integer value 27648 corresponds to a current value of 20 mA and the integer value 0 corresponds to a current value of 0 mA. The upper and lower limits are MAX=27648 and MIN=0 for normalization and MAX=20 and Min=0 for scaling. Since the input values are of the Integer data type and the output values are scaled as Real data type, the NORM_X function converts the data type from Integer to Real.

Fig. 01
The connection of the two blocks as in Fig. 01 results in the following definition between the input value of the NORM_X block and the output value of the SCALE_X block:
| NORM_X_VALUE - NORM_X_MIN |
|
SCALE_X_OUT - SCALE_X_MIN |
| ------------------------------------------- |
= |
----------------------------------------- |
| NORM_X_MAX - NORM_X_MIN |
|
SCALE_X_MAX - SCALE_X_MIN |
If the "VALUE" input of the NORM_X block has the value 10500 and the limit values as in Fig. 01, then the "OUT" output of the SCALE_X block has the value:
| 10500 - 0 |
|
SCALE_X_OUT - 0 |
| ------------- |
= |
----------------------- |
| 27648 - 0 |
|
20 - 0 |
|
|
|
SCALE_X_OUT = 7.5955 (which means 7,5955 mA) |
Example 2 - Current measurements
The analog values of 4-20 mA are to be displayed with integer values. Since the input values are of the Real data type and the output values are scaled as Integer data type, the SCALE_X function converts the data type from Real to Integer. The integer value 27648 corresponds to 20 mA (upper limit) and the integer value 5530 corresponds to 4 mA (lower limit). For example, the integer value 10500 is scaled for an analog value of 7.5955 (mA).

Fig. 02
Note
To change the data type conversion for the blocks, mark the block concerned and click on the yellow arrow. You can then select the required data type conversion from the drop-down list that opens. You must then change the parameters, because the data types of the parameters have changed.

Fig. 03
Additional Keywords
Voltage, temperature and resistance measuring, Pressure sensor
|