Siemens Scale X
Siemens Scale X
SCALE_X: Scale
Description
You can use the "Scale" instruction to scale the value at the VALUE input by mapping it to a specified value
range. When the "Scale" instruction is executed, the floating-point value at the VALUE input is scaled to the
value range that was defined by the MIN and MAX parameters. The result of the scaling is an integer, which is
stored in the OUT output.
Enable output ENO has signal state "0" if one of the following conditions applies:
The value at the MIN input is greater than or equal to the value at the MAX input.
The value of a specified floating-point number is outside the range of the normalized numbers according
to IEEE-754.
An overflow occurs.
The value at the VALUE input is NaN (Not a Number = result of an invalid arithmetic operation).
Note
For more information on the converting of analog values, refer to the respective manual.
Parameters
mk:@MSITStore:C:\Program%20Files%20(x86)\SIEMENS\Automation\Portal%20V... 27/07/2020
SCALE_X: Scale (S7-1200, S7-1500) Página 2 de 2
You can select the data types of the instruction from the "???" drop-down lists of the instruction box.
You can find additional information on valid data types under "See also".
Example
The following table shows how the instruction works using specific operand values:
MIN Tag_MIN 10
MAX Tag_MAX 30
OUT Tag_Result 20
If the "TagIn" operand has signal state "1", the instruction is executed. The value at the "Tag_Value" input is
scaled to the range of values defined by the values at the "Tag_MIN" and "Tag_MAX" inputs. The result is
stored in the "Tag_Result" output. If the instruction is executed without errors, the ENO enable output has
signal state "1" and the "TagOut" output is set.
mk:@MSITStore:C:\Program%20Files%20(x86)\SIEMENS\Automation\Portal%20V... 27/07/2020