Heading RCADev

 

HOME

PHANTOM UAV

VACUUM FORMING

OpenTX

CONTACT ME

 

 

Previous Page – Global Variables

Next Page – Special Functions

OpenTX Reference Guide 10 – Logical Switches

 Each line has the following format.

 

Logical Switch

Number

 

 

Function

 

 

V1

 

 

V2

 

 

Switch

 

 

Duration

 

 

Delay

 

 

 

 

 

 

 

 

Functions evaluate to TRUE of FALSE by comparing two values. The result of this comparison is AND’ed with an optional Switch, Duration and/or Delay to evaluate the Logical Switch state.

 

Therefore,

    Logic Switch n  =  LSn  =  (V1 function V2) AND Switch AND Duration AND Delay

 

In the following table, a, b & are source variables and x is an integer value, i.e. a constant.

 

FIELD

PARAMETER

DESCRIPTION

LS1 – LS32

 

Logical Switch numbers 1 to 32.

Function

---

a=x

a~x

a>x

a<x

|a|>x

|a|<x

AND

OR

XOR

 

Edge

 

 

 

 

 

 

a=b

a>b

a<b

>=x

|▲|>=x

 

 

Timer

 

 

Stcky

Logical switch value always = 0.

TRUE if V1 = V2, otherwise FALSE.

TRUE if V1 is approximately = V2. (+/- 0.9)

TRUE if V1 is greater than V2.

TRUE if V1 is less than V2.

TRUE if magnitude of V1 is greater than V2.

TRUE if magnitude of V1 is less than V2.

TRUE if V1 and V2 are both TRUE.

TRUE if V1 or V2 are TRUE.

TRUE if V1 or V2 are TRUE but not both.

 

V1, V2 = [t1:t2] Switch becomes TRUE only after the trigger V1 has been TRUE for at least t1 AND released before t2. If t2 = ‘--' then only t1 applies.

Once triggered, if duration = ‘--', then the logic switch is TRUE for 1 processing cycle (~30mS)

Otherwise, the duration time applies.

 

TRUE if V1 is equal to V2, (V2 = variable)

TRUE if V1 is less than V2, (V2 = variable)

TRUE if V1 is greater than V2, (V2 = variable)

TRUE if change in V1 is greater or equal to V2.

TRUE if absolute value of the change in V1 is greater or equal to V2.

 

TRUE for on time (V1), FALSE for off time (V2), continuously repeating.

 

Set TRUE by V1, set FALSE by V2. (R/S flip flop.)

If V1 and V2 become true at the same time, the switch toggles state. The LS is off if the Switch is off but an off Switch does not set the toggle FALSE.

V1

(a)

---

IThr, IAil, IEle, IRud

Rud, Ele, Thr, Ail

S1, S2

LS, RS

MAX

CYC1, CYC2, CYC3

TrmR, TrmE, TrmT, TrmA

SA – SH

TR1 – TR16

CH1 – CH4

GV1 – GV9

Batt

Time

Tmr1, Tmr2

 

Telemetry Data

RSSI

A1, Alt, Rpm, Fuel,

T1, T2,

Spd, Dist,

Galt,

Cell,

Cels,

Vfas,

Curr, Cnsp, Powr,

AccX, AccY, AccZ,

Hdg, VSpd, Aspd,

A1-, A2-, A3-, A4-,

Alt-, Alt+,

Rpm+,

T1+, T2+,

Spd+,

Dst+,

Aspd+,

Cell+, Cels+,

Vfas+,

Curr+,

Powr+.

 

Output values from ‘Inputs’ block.

Output directly from gimbal sticks.

Pot 1, pot 2.

Left slider, right slider.

Always 100%.

Outputs from CCPM mixing for helicopter swash plate servos.

Trim settings for rud, ele, thr and ail.

Switches A to H.

Trainer channels 1 to 16.

Channel output values.

Global variables 1 to 9

Battery voltage

Current time

Timer 1, timer 2.

 

 

Receiver signal strength indication.

Analog input, altitude, engine speed, fuel level.

Temperature sensors 1 & 2.

Speed, distance.

Altitude above ground.

Lowest battery cell voltage.

Total battery voltage.

Peak voltage

Current, mAH, Power.

Accelerometers X, Y & Z.

Heading, Vertical speed, Air speed,

Analog inputs 1 to 4, minimum values,

Altitude, minimum and maximum values.

Engine speed, maximum,

Timers 1 and 2, maximums,

Speed, maximum,

Distance, maximum,

Air speed, maximum,

Highest voltage of lowest voltage cell, highest battery voltage.

Peak voltage, maximum,

Current, maximum,

Power, maximum

V2

(b, x)

The list of parameters for functions with variables ‘b’ is the same as for V1.

The numeric range for functions with constants  ‘x’, is dependent on V1. For example,

the range of time is 00:00 to 23:59,

the range of timers is –60:0 to +60:00 minutes.

Switch

---

SA↑ to SH↑, SA- to SH-,

SA↓ to SH↓

S31 to S36

tRl, tRr, tEd, tEu,

tTd, tTu, tAl, tAr

L1 – L32

ON

One

FM0 – FM8

!SA – !SH

!S31 -!S36

!tRl, !tRr, !tEd, !tEu,

!tTd, !tTu, !tAl, !tAr

!L1 – !L32

!ON

!One

!FM0 – !FM8

No switch is used.

Switches positions A to H, up, middle & down.

 

Multi-position switch, positions 1 to 6. (If fitted)

Trim switches left & right, up & down for rudder, elevator, throttle & aileron all toggle state with each trigger.

Logic switches 1 to 32.

Always TRUE

Triggered once only with power up or selecting a new model.

Flight modes 0 to 8.

NOT switch positions A to H, up, middle & down.

NOT multi-position switch, positions 1 to 6. (If fitted)

NOT trim switch positions, rudder and elevator.

NOT trim switch positions, throttle and aileron.

NOT logic switches 1 to 32.

NOT on = OFF.

NOT triggered initially, triggered subsequently.

NOT flight modes 0 to 8.

Duration

---

0.0 to 25.0

No duration limit,

TRUE for specified duration in seconds.

Delay

---

0.0 to 25.0

No delay before becoming TRUE.

Delay for specified time before becoming TRUE.

 

Phantom Divide

 

Previous Page – Global Variables

Next Page – Special Functions

 

Footer RCADev