• Share page
  •  
  •  
  •  
  •  

MODEL LOGICAL SWITCHES screen explanation / How to use logical switches

This section describes the setting items on the MODEL LOGICAL SWITCHES screen of OpenTX / EdgeTX radio.

What are LOGICAL SWITCHES?

LOGICAL SWITCHES are virtual two-position switches defined in OpenTX/EdgeTX that take two values of TRUE (+100%) and FALSE (-100%). These switches automatically turns ON / OFF according to various specified conditions and can be used as a trigger to call other functions. 64 logic switches from L01 to L64 can be defined for each model.
Defined logical switches can be used as input device on INPUTS screen , MIXES screen , etc., just like a physical stick or switch. It can also be used as argument on LOGICAL SWITCHES screen to determine the behavior of other logical switches.

MODEL LOGICAL SWITCHES screen explanation

PC If you open "LOGICAL SWITCHES" screen from "MODEL menu", you will see a screen like this. A list of logical switches defined in this MODEL is displayed.
The meaning of each field is as shown in the table below, starting from the left. Any item can be entered on detailed setting screen (described later).
field item description
1 Name Number of logical switches. Switches that currently meet the conditions and are set to "TRUE" are displayed in bold here.
2 Function / Condition Judgment condition or logical expression set for this logical switch.
3 Value 1 This is the argument (left side) that is the input for judgment condition or logical expression.
4 Value 2 This is the argument (right side) that is the input for judgment condition or logical expression.
5 AND Switch This is an additional condition for enabling this logical switch. If nothing is specified, "---" will be displayed.

PC Move cursor to any logical switch on LOGICAL SWITCHES screen and press and hold ENTER key to display such a menu. Select "Edit" to open detailed setting screen .
Select "Clear" to clear the logical switch settings.
PC You can set color display / touch panel model in the same way. Switches whose conditions are satisfied and set to "TRUE" change the color of their entries.
PC There is a "LOGICAL SWITCH MONITOR" screen on page 5 of "CHANNELS MONITOR" screen for color display / touch panel models. It lists the state of the logical switches. For "CHANNELS MONITOR", please refer to Basics of OpenTX/EdgeTX radio operation .

MODEL LOGICAL SWITCHES setting items explanation

MODEL LOGICAL SWITCHES screen
This is detailed setting screen for logical switch. Number of this logical switch is displayed on the right side of the top of the screen where "LOGICAL SWITCHES" is written. When this logical switch becomes TRUE, this number display changes to bold.
item description
Func (Function / Condition) Judgment condition or logical expression set for this logical switch. See LOGICAL SWITCHES judgment conditions and logical expressions for more information.
V1 (Value 1) Specify the argument (left side) that is the input of judgment condition or logical expression. Here you can specify sticks, switches, trims, global variables (G1 ~ G9), Logical switches, "Input" set on INPUTS screen , channel set on MIXES screen , MAX (constant always returns 100), Cyclic (defined on the Heli Setup screen), Batt (radio battery voltage), Time, Tmr1 ~ Tmr3 (timer set to MODEL). The choices are switched according to judgment conditions or logical expression selected in 'Func' field.
V2 (Value 2) Specify the argument (right side) that is the input of judgment condition or logical expression. As with V1 above, you can specify various values. Also, depending on selected logical expression, specify a constant to be compared with V1 here. The choices are switched according to judgment conditions or logical expression selected in 'Func' field.
AND Switch This is an additional condition for enabling this logical switch. In addition to judgment condition or logical expression specified in Func field, condition in this field is also added to the judgment. See AND Switch setting value for details.
Duration If specified here, the state is maintained for a certain period when this logical switch becomes TRUE.
Specifies the time, in seconds, that this logical switch maintains TRUE. When this logical switch becomes TRUE, the TRUE state is maintained for the specified time regardless of subsequent changes in the conditions. And also, regardless of subsequent changes in conditions, it becomes FALSE after a specified time.
Delay If specified here, switching timing of this logical switch will be delayed.
In seconds, specify the time until the logical switch is actually switched from FALSE to TRUE or TRUE to FASLE after judgment condition or logical expression changes. If the condition changes again within the time specified here, the value of the logical switch does not change. That is, the value of the logical switch changes only when the condition is maintained for the time specified here.

LOGICAL SWITCHES judgment conditions and logical expressions

In the expression, a and b represent arguments (sticks, switches, etc.), and x represents the constants to be compared.
judgment condition / logical expression description
a=x TRUE when the argument V1 is exactly the same as the constant V2.
a~x or a→x TRUE when the argument V1 is about the same as the constant V2.
a>x TRUE if the argument V1 is greater than the constant V2.
a<x TRUE if the argument V1 is less than the constant V2.
|a|>x TRUE if the absolute value of the argument V1 is greater than the constant V2.
|a|<x TRUE if the absolute value of the argument V1 is less than the constant V2.
AND The logical product of the argument V1 and the argument V2 is determined. This logical switch is TRUE when both arguments V1 and V2 are TRUE.
OR The logical sum of the argument V1 and the argument V2 is determined. This logical switch is TRUE when either argument V1 or argument V2 is TRUE.
XOR The exclusive OR of argument V1 and argument V2 is determined. This logical switch is TRUE when the arguments V1 and V2 do not match.
Edge This is a switch that monitors the argument V1 and catches the change point (edge) to switch. The argument V2 is divided into two parts [ t1 : t2 ]. If the argument V1 is TRUE for a minimum of t1 (seconds) and a maximum of t2 (seconds), this switch will be TRUE for a moment (about 30 milliseconds).
The timing when this switch becomes TRUE is the moment when the condition is satisfied (between t1 seconds and t2 seconds after the argument V1 becomes TRUE). 0.0 seconds to 175.0 seconds can be specified for t1. 0.1 seconds to 275.0 seconds can be specified for t2. Must be t1 < t2.
If t2 is specified as '<<', this switch will be TRUE for a moment at the moment when the argument V1 is switched to TRUE (Leading Edge). For example, [0.0:<<] is specified, this switch will be TRUE for a moment when the argument V1 is switched to TRUE. If [2.0:<<] is specified, this switch will be TRUE for a moment 2 seconds after the argument V1 is switched to TRUE.
If t2 is specified as '--', this switch will be TRUE for a moment at the moment when the argument V1 is switched to FALSE (Trailing Edge). For example, if [0.0:--] is specified, this switch will be TRUE for a moment when the argument V1 is switched to FALSE. If [2.0:--] is specified, this switch will be TRUE for a moment 2 seconds after the argument V1 is switched to FALSE.
a=b TRUE when argument V1 is the same as argument V2.
a>b TRUE if argument V1 is greater than argument V2.
a<b TRUE if argument V1 is less than argument V2.
△>x TRUE every time the argument V1 changes by more than the amount indicated by the constant V2. For example, if you specify aileron for V1 and 10 for V2, it will be TRUE every time the aileron becomes 10, 20, 30, 40 ....
|△|>x TRUE every time the absolute value of the argument V1 changes by more than the amount indicated by the constant V2.
Tim (Timer) This is a switch that automatically switches over time. First, it becomes TRUE for the time (seconds) specified by the argument V1, and then FALSE for the time (seconds) specified by the argument V2. And repeat this.
Stky (Sticky) This is a switch to switch between TRUE and FALSE by operating two switches.
When this switch is FALSE, only argument V1 is monitored, and when argument V1 changes to TRUE, this switch becomes TRUE.
When this switch is TRUE, only argument V2 is monitored, and when argument V2 changes to TRUE, this switch becomes FALSE.
Nothing happens when the monitored switch is already TRUE. Once the switch to be monitored becomes FALSE and becomes TRUE again, this switch also switches.

AND Switch setting value

The judgment result (TRUE / FALSE) of the condition specified in this AND Switch field is ANDed (logical product) with respect to the judgment condition (TRUE / FALSE) specified in Func field. This is an additional condition that specifies whether this logical switch is enabled / disabled.
setting value description
SA↑Enabled when SA switch is in the up / front position. Similarly, SB to SH switches can be specified.
SA-Enabled when SA switch is in middle / center position. Similarly, SB to SH switches can be specified.
SA↓Enabled when SA switch is in down / back position. Similarly, SB to SH switches can be specified.
tRl Enabled when rudder trim switch is clicked to left.
tRr Enabled when rudder trim switch is clicked to right.
tEd Enabled when elevator trim switch is clicked down.
tEu Enabled when elevator trim switch is clicked up.
tTd Enabled when throttle trim switch is clicked down.
tTu Enabled when throttle trim switch is clicked up.
tAl Enabled when aileron trim switch is clicked to left.
tAr Enabled when aileron trim switch is clicked to right.
L01 - L64 Enabled when logical switches L01 - L64 are enabled.
FM0 - FM8 Enabled when flight mode FM0 - FM8 is enabled. This option does not appear unless the flight mode is set for this MODEL.
Tele Enabled when telemetry data is being generated (when it is able to communicate with receiver).
Act Enabled for 2 seconds when operating physical input devices such as sticks, switches, buttons, trim switches, dials, etc.
Those with a "!" mark in front of the trigger name mean that the condition is reversed. For example, "!SA-" means "when SA switch is not in middle / center position (= up or down)".

To know more about How to Fly Hobby Drone