show the entry list
STEP 7 (TIA Portal) -- Creating S7 programs -- Executing operations
How do you filter only the places before and after the decimal point from a real value in STEP 7 (TIA Portal) V11?
How do you calculate the linear values for the y-coordinate of point P in STEP 7 (TIA Portal) V11?
How can you add together physical flow measurements (mass flow rate, for example) to a total value in STEP 7 (TIA Portal) V11?
How do you implement numerical differentiation in STEP 7 (TIA Portal) V11?
How do you convert data types in the TIA Portal for the S7-1200/1500?
How can you convert a hexadecimal number into ASCII characters with STEP 7 (TIA Portal) V11?
How can you determine the bit position of an active bit in a marker word with STEP 7 V11 and monitor a 32-bit field?
How can you delay the output signal in relation to the input signal in STEP 7 (TIA Portal) V11?
In STEP 7 (TIA Portal) V11, how can you scale integer values in real numbers and real values in integer numbers for analog measurements?
How do you copy memory areas in STEP 7 (TIA Portal) V11?
How in STEP 7 V11 can you access the unstructured data types bit-by-bit, byte-by-byte or word-by-word and symbolically?
How do you program the overlapping of tags with the keyword "AT" in the TIA Portal V11?
How do you program a pulse encoder in STEP 7 (TIA Portal)?
How do you program a shift register with the LAD/FBD statements in STEP 7 V5.5 and in V11?
What properties do you have to watch out for in STEP 7 V11 when you are inserting characters into a string with the "INSERT" statement?
In STEP 7 (TIA Portal) V11, how can you scale integer values in real numbers and real values in integer numbers for analog measurements?
Part number:

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

 Entry ID:39334504   Date:2012-04-16 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Help
Online Help
Guided Tour