Object: Unit Conversion
Symbol:
A Unit Conversion object is used to define a conversion rule. The table lists all defined conversion rules. You can edit a conversion rule in the input fields listed below the table.
Table
Name |
The entry is automatically implemented as a |
Type | . Type of conversion rule
|
Setting | Displays the configured conversion rule. |
Condition |
|
Condition Setting | If you select TRUE as the Condition, then the field is hidden. If you configure Language as the Condition, then the field shows the current configuration. Example: If you select Variable as the Condition, then the field shows the current configuration. Example: You can edit the current condition setting below the table in the input fields for Condition Setting. |
Input field: Single scaling (offset)
The input variable is added with an offset.
Offset |
|
Input field: Single scaling (factor)
The input variable is multiplied by the factor.
factor |
|
Input field: Linear scaling 1 (factor and offset)
The input variable is converted with the linear equation defined below.
factor |
|
Offset |
|
Input field: Linear scaling 2 (base and target range)
The input variable is converted to be within a target range. CODESYS internally creates a linear equation from the following input values.
Base start value | . Lowest possible value for the input variable.
|
Base end value | . Highest possible value for the input variable.
|
Target start value | . Lowest possible value for the output variable.
|
Target end value | . Highest possible value for the output variable.
|
Conversion of electric current from a 10-bit input signal to an amperage range of 4-20 mA
Base start value |
|
Base end value |
|
Target start value |
|
Target end value |
|
Input field: User defined conversion
Convert := | Conversion rule as mathematical function of |
Reverse := | Reverse function of the function defined in Convert |
Input field: Switchable Conversion
Use this conversion rule when you want to apply a conversion that is language-specific or variable-dependent.
Switchable conversion name | Selected from a list of predefined conversion rules. Double-click directly into the field for editing. |
Condition Setting | Configured condition. Click into the input fields in Condition Setting to edit the condition. |
The Conv_A_LanguageDependent
conversion rule that defines which conversion rule is executed for the English or German language.
Name | Type | Setting | Condition | Condition Setting |
---|---|---|---|---|
| Switchable Conversion |
| Language |
Switchable conversion name | Condition Setting |
---|---|
|
|
|
|