In the configuration editor IEC editors. Add the editor as an object in the . You can rename it there.
, you define conversions which can be used for variables in visualization elements and in theeditor
You can define various conversions for your project. Enter a
and choose the for each. The respective conversion formula is automatically displayed in the column. Enter a to determine when the conversion should be executed. Depending on the selected , define specific parameters in the area below the table.The editor provides the following conversion types:
Calculation with an offset: Single shifting (offset)
Calculation with a factor: Single scaling (factor)
Calculation with a factor and an offset: Linear scaling 1 (factor and offset)
Calculation with the base range and target range: Linear scaling 2 (base and target range)
Calculation with a user-defined expression: User-defined conversion
Different calculations depending on a variable value: Switchable conversion
For usage of unit conversions in IEC editors, refer to the chapter Usage in IEC Editors.
For usage of unit conversions in visualizations, refer to the chapter Using Unit Conversion in the Visualization part of the EcoStruxure Machine Expert online help.
You can select 3 conditions to define when the calculation is executed:
Condition |
Description |
---|---|
|
The conversion is always performed. |
|
Language of the visualization (value of variable VisuElems.CurrentLanguage) |
|
The conversion is performed depending on a variable value. The compare value can be a constant, a variable or an IEC expression. |
Use this conversion if you want to add an offset to the input value.
(output value = input value + offset)
Parameter |
Description |
---|---|
|
Value or variable |
Use this conversion if you want to multiply the input value by a factor.
(output value = input value * factor)
Parameter |
Description |
---|---|
|
Value or variable |
Use this conversion if you want to multiply the input value by a factor and to add an offset.
(output value = (input value * factor) + offset)
Parameter |
Description |
---|---|
|
Value or variable |
|
Value or variable |
Use this conversion if you want to calculate the value by defining the input and output range. A factor and an offset are calculated internally.
Parameter |
Description |
---|---|
|
Lower value of the input range |
|
Upper value of the input range |
|
Lower value of the output range |
|
Upper value of the output range |
Example
Base start value: 0
Base end value: 1024
Target start value: 4.0
Target end value: 20.0