Variables
A brand new area is opened by implementing the variables. You can create custom variables in number
methods: #variables
▪
▪
▪
▪
▪
-2147483648 and 2147483647.
Variables tab in the Control menu
Value Section
This section can be used for numeric types.
▪ Operand: the increment, the number that will be added to the current value (negative value is accepted).
▪ Min (optional): the lowest allowed value
▪ Max (optional): the highest allowed value
▪ Add button: the operand will be added to the current value. If the result would be higher than the max
setting, the max will be valid; if the result would be lower than the min setting, the min will be valid
▪ Cycle button: the operand will be added to the current value. If the result would be beyond the limit
Examples
The following shows the difference between the Add and the Cycle options. The input values are the same in
both cases:
▪ Min: 1
▪ Max
▪ Operand: 1
In Add case: when the value hits the limit (max), the operand will not increase the value any more.
In Cycle case: when the value hits the limit (max), the value will be stepped to the other end of the interval.
A similar case happens vice versa: when the operand is a negative number and the value hits the min value.
TIPS AND TRICKS: Set min=1, max=2, operand=1 and use the cycle method. Thus the value of the variable
Case Convert
the change will be performed only if you press the Convert button. A typical example is when two different
ranges of values have to meet:
Incoming values:
Outgoing values: between 0 and 100 (e.g. the controlled device accepts these values).
1 2 3 4 5 5 5
Add Add Add Add Add Add
1
2
3
4
5
Min Max New value Min Max New value
Case 1 1 10 Case 6 126 60
Case 2 26 20 Case 7 70
Case 3 30 Case 8 176 200 80
Case 4 76 100 40 Case 9 201 90
101 Case 10 226 100