Question on switches

General Help and support for the Taranis Radio.
Post Reply
rwhammer
Posts: 13
Joined: Thu Feb 28, 2019 7:46 pm
Country: -

Question on switches

Post by rwhammer » Sun Jun 16, 2019 8:32 pm

When setting up a switch in OpenTX your choices are all the normal switches like SA, SB so on but I also find !SA, !SB. My question is what is the ! exclamation mark for? Is it a combination?


Daedalus66
Posts: 1824
Joined: Tue Dec 27, 2011 8:22 pm
Country: -
Location: Ottawa

Re: Question on switches

Post by Daedalus66 » Sun Jun 16, 2019 8:44 pm

Exclamation mark before switch name means “not”. So “!SA(up)” means either SA- or SA(down).

It’s not up so it must be either of the other two positions.

rwhammer
Posts: 13
Joined: Thu Feb 28, 2019 7:46 pm
Country: -

Re: Question on switches

Post by rwhammer » Sun Jun 16, 2019 8:56 pm

So if I use a 3 position switch but only want to use it as a 2 position switch such as SA(up) -100 do I set SA(down) to 100 or 0 and should I replace middle position SA- to !SA 0 or is it not necessary?

rdeanchurch
Posts: 660
Joined: Tue Dec 27, 2011 11:22 pm
Country: United States
Location: Carson City, Nv

Re: Question on switches

Post by rdeanchurch » Mon Jun 17, 2019 2:55 am

A two position switch is emulated by using SA(up) and not SA(up), i.e. !SA(up). The weight is automatically determined and need not be specified. Weight normally is set for INPUTS or MIXES.
So if you wanted to use the switch to control a channel output you would normally do something like this:

Ch7 MAX Weight(100) Switch(SA(up)
..+= MAX Weight(-100) Switch(!SA(up)

Think of it as more a true false statement than a numeric value. If the SA is in the up position SA(up) is true and !SA(up) is false.

If SA(up) is in the up position, the first statement in channel 7 is active. If SA is not in the up position !SA(up) is true and the second line under channel 7 is active, and the first line is ignored as it's Switch(condition) is false.
Dean
OldDmbThms: 1. Takeoff, 2. Crash, 3. Repair, GOTO 1

rwhammer
Posts: 13
Joined: Thu Feb 28, 2019 7:46 pm
Country: -

Re: Question on switches

Post by rwhammer » Mon Jun 17, 2019 1:32 pm

Thank you. Still learning.


Post Reply

Return to “General help (FrSky Taranis radio)”