56
4.3. Logical Switches
The logic switch is a user-programmed virtual switch. They are not physical switches that flip from one
location to another, but they can be used as program triggers just like any physical switch. By evaluating
the input conditions for the programming of the logic switches, they are turned on and off (logically they
become true or false). They can use a variety of inputs, such as physical controls and switches, other
logic switches, and other sources such as telemetry values, channel values, timer values, or global
variables. They can even use the values returned by the LUA model script.
There are up to 64 logical switches, each with three types of operators:
Arithmetic operations either compare two variables "a" and "b" or compare one variable "a"
with a constant "x". Variables can be of any source, such as hardware sources, logic inputs,
mixed channels, 9 global variables, or telemetry values. The constant "x" is the value to be
compared when the input V2 is set.
Logical operations can be performed on binary inputs (such as hardware sources or logic
inputs) and include logical AND, OR, and XOR functions.
The difference operation compares the magnitude of the change in the variable "a" with
another value "x".
Functions
a=x: If the value of the selected source "a" (V1) is "accurate" equal to "x" (V2)
(programmed value), the condition is True. Care must be taken when using "Exact" equals the
function. For example, when the test voltage is equal to the 8.4v setting, the actual telemetry
reading may jump from 8.5V to 8.35V, so the logic switch never opens if the condition is never
met.
a~x: If the value of the selected source "a" (V1) is approximately equal to (within about
10%) to "x" (V2), the programmed value, the condition is True. In most cases, it is best to use
an approximation equal to a function instead of "exact" equal to a function.
a>x: If the value of the selected source "a" (V1) is greater than "x" (V2), the condition is
True, which is the programmed value.