The Converter is a function that converts the values of source properties as defined in the settings.
Create a converter in the Converter Editor. Select the converter when associating an object property with a source property to reflect the converted value to the property.
When associating an object property with a source property, select a converter in the property selector window.
For information on [Direction], refer to the following.
Data Binding
[Direction]
The Range Converter and Expression Converter support [One Way] only. When using those converters, [Direction] is set to [One Way] automatically.
If the [Direction] is [One Way], no input is possible from an object, such as a Numeric Display. Clear the checkbox if the object has the [Enable Input Mode] property.
In the Expression Editor, create expressions to use in the Converter. From the Expression Converter Properties window, click the ellipsis [...] of the [Expression] field to display the Expression Editor.
1: Type the expression and operator. You can also insert an operator from the shortcut menu that appears when right-clicking an expression (Example: To insert *, right-click and select [Operators]).
2: Select the object type to insert in the expression. The object list will change.
3: Select the object to insert in the expression. When you click the object, the object is inserted at the expression cursor position.
For more information about supported operators and how it works, see Available Operators and Functions.
If the data types are identical, you can use multiple variables in one expression. The following is an example of a valid expression, where the two variables are of the same DINT data type:
MyDINT01 + MyDINT02
The following is an example of an invalid expression, where the two variables are of data types DINT and STRING respectively:
MyDINT01 + MyString01
When expressions are displayed in red, it means that there is an error in the expression. Variables with different data types will not work in an expression.
When the data of expression is changed, the calculation will be performed immediately.
The mathematical expression result contains decimal points.
(Example 1)
In the following case, if the value of INT1 is 101, then the result is
10.1 (.1 is not truncated).
To truncate the decimal points, use the floor block.
(Example 2)
In the following case, if the value of INT1 is 101, then the result is
10.