5. Software Control - Lightware Device Controller
5.9.6. Variables
A brand new area is opened by implementing the variables. You can create custom variables in number
or text format, which can be used in the Event Manager. The variables can have the following properties/
methods:
#variables
▪
Numeric (integer) type with min/max value setting, or string-type (determined automatically)
▪
Increment/step the numeric value,
▪
Value-dependent case operations,
Reading and storing the values of LW3 properties into string or numeric variables.
▪
The max length of a string variable can be 15 characters. Numeric variable is defined between
▪
-2147483648 and 2147483647.
The defined variables are stored in a non-volatile memory and the value is kept in case of a reboot.
Variables tab in the Control menu
MMX4x2 series – User's Manual
Value Section
You can set the value of the variable by the field. The type of the variable is determined automatically based
on its value (numeric/string).
Add / Cycle Section
This section can be used for numeric types.
Examples
The following shows the difference between the Add and the Cycle options. The input values are the same in
both cases:
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:
can be toggled, which can be linked to a property with two states (e.g. low/high level) in Event manager.
Case Convert
This tool can be used to change the value of a variable if it fits in any of the defined intervals. The check and
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: between 0 and 255 (e.g. the slider of a controller can have these values).
Outgoing values: between 0 and 100 (e.g. the controlled device accepts these values).
Defined cases:
Case 1
Case 2
Case 3
Case 4
Case 5
Applied firmware package: v1.6.0b19 | LDC software: v2.5.13b5
▪
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
(min/max), the value will be stepped to the other end of the interval.
▪
Min: 1
Add
Add
Add
1
2
3
4
▪
Max: 5
▪
Operand: 1
Cycle
Cycle
1
2
3
Set min=1, max=2, operand=1 and use the cycle method. Thus the value of the variable
Min
Max
New value
1
25
10
26
50
20
51
75
30
76
100
40
101
125
50
Add
Add
Add
5
5
5
Cycle
Cycle
Cycle
4
5
Min
Max
New value
Case 6
126
150
60
Case 7
151
175
70
Case 8
176
200
80
Case 9
201
225
90
Case 10
226
255
100
58
Need help?
Do you have a question about the MMX4x2 Series and is the answer not in the manual?