Jump to content

Unable to understand OTX configuration for landing gear


Allan Bennett
 Share

Recommended Posts

I've got a couple of models with electric landing gear, and I'm trying to be a bit more 'clever' when programming my third:

For all three models my OTX Input line is "SC weight (+100%) [Gear]"

For the two models that are operating at the moment my Mixes line is "I10 Gear:Weight (-100%) [Gear]".

Checking this programming with a servo, before installing in the third model, I noticed that the servo moves to three positions following the position of SC, and I thought it might be better if it would be at +100% with SC up, and -100% with SC anything but up so that, as far as the retracts see it, there's no middle position.

So this time I programmed the Mix with two lines, "I10:Gear weight (-100%) Switch (!SC up)" followed by "I10:Gear weight (+100%) Switch (SC up)". To my surprise the servo is at one extreme (presumably +100%) with SC up, then moves to middle position (presumably 0%) with SC at middle position, and finally moves back to it's starting position with SC down. How is that working?

Is a Logical switch the only way to have the servo move direct from +100% to -100% when the switch is anything but up?

Edited By Allan Bennett on 15/08/2020 17:38:26

Link to comment
Share on other sites

I did it very simply on the Inputs page:

I5:Gear MAX Weight (+100%) Switch (!SA^) [Down]
              MAX Weight (-100%)  Switch (SA^)  [Up]

The mixer line is simply:

CH5:Gear I5:Gear Weight (+100%) [Gear]

Works a treat on my Spitfire...

--

Pete

 

Edited By Peter Christy on 15/08/2020 17:55:49

Link to comment
Share on other sites

I use just a line in Mixers with a curve to translate the 3 position switch into a 2 position one. I'm using switch G with one channel for each leg so that I can put a delay on one side.

gear mix.jpg

The delay means that the legs operate one after the other, just like most WW2 fighters. Not strictly needed but I like it!

Curve 2 s just a 3 point linear curve that means SG middle or down extends the U/C, SG up retracts it.

gear curve.jpg

If the retracts operate the wrong way round then I reverse as needed in Outputs.  I really should name the curve so I don't forget what it's for!

Edited By Bob Cotsford on 15/08/2020 19:42:14

Link to comment
Share on other sites

One good way to use a 3 pos switch for gear is to make it “unknockable” i.e. require the switch to be moved in a specific sequence within a time period in order to activate the desired function:

This prevents that ignominious experience of an accidental gear retraction in the pits! I created a set of switches like this and uploaded them to the RCSettings site with instructions for use. I use them a lot for motor arming and gear, and they would be useful for petrol ignition too. Remember that sequenced retraction could also be triggered by this if you want using delays or curves.

Edited By MattyB on 15/08/2020 20:07:06

Link to comment
Share on other sites

Thanks for all the input.

The two models I already have using retracts work just fine using the simple one-line command, but it's only when I tested it with a servo today for a new model that I realised that the retracts (or the pilot!) could possibly be confused by the middle switch position, and it would be much better to make the 3-position switch into a 2-position one. What I now don't understand is why my '!^' and '^' commands don't result in that.

But, as has been written many times in this forum, there are many ways to achieve the same thing in OTX, and for this application I love the curve solution suggested by Bob. (I also hadn't noticed, or paid attention to, the Delay and Slow options in the Mix menu -- could be useful sometime.)

I like the idea of Matty's 'unknockable' switches too, though the need for a sequence of movements to lower the u/c on my landing approach is not very attractive -- I've got enough to do at that point in the flight! I'll have a look at it though, for I'm sure the 'unknockable' aspect could be applied only to u/c up, leaving u/c lowering as a single flip of the switch.

Link to comment
Share on other sites

Posted by Allan Bennett on 15/08/2020 20:46:26:

What I now don't understand is why my '!^' and '^' commands don't result in that.

Having just bought a Taranis this also puzzled me and made me curious. Obviously the logic looks correct.

I set up a new model and had the same results as you. Curious!

So this time I programmed the Mix with two lines, "I10:Gear weight (-100%) Switch (!SC up)" followed by "I10:Gear weight (+100%) Switch (SC up)". To my surprise the servo is at one extreme (presumably +100%) with SC up, then moves to middle position (presumably 0%) with SC at middle position, and finally moves back to it's starting position with SC down. How is that working?

After some research I found that using a weight of -100% reverses the servo, which is not what you want to do. So when the switch is down the gear will go up because of the -100%.

With regard to the centre position of the switch. For some reason, that is beyond me, the logic does not recognise this as !^ . A line for this has to be added in the mix.

Like this

CH5 100 IGear !SA! Gear

+= 100 SA SA^

+= 100 SA SA-

For the SA- an offset of 100 is added in the edit screen.

dscn0514 (2).jpg

Please try this and let me know the results please.

Cheers beer

Steve

Link to comment
Share on other sites

I'm obviously not fully understanding the way Mixes work: I've already implemented Bob Cotsford's solution to 'convert' the 3-position switch into a 2-position, and that works fine of course. But I've been playing around in OTX simulator to try and understand what's going on with my previous attempt.

I would have thought that adding a third line for the middle switch postion should work, in which case the first line could be "SAv" instead of "!SA^", thus specifically describing the output of each of the three switch positions. I've just tried it out in OTX simulation with the up and down switch positions defined as 100% and the middle one as 0%, and the output mimics the three positions of the switch. BUT, the output mimics the three switch positions even if all three Weight values are 100%, and it also mimics the three switch positions even if there's only one simple line "I10:Gear weight (100%)", the switch having been defined in Inputs.

So, a lot to learn still, but at least I've got an elegant solution to make it behave like a 2-position switch. I'm now thinking it might be easier to use Curves, instead of Rates and Expo, to calm down my elevator and aileron control inputs for my helis, as I could then see on the screen what the effect is.

Link to comment
Share on other sites

Allan,

By default the switch positions and values are :-

up -100%

- 0%

down 100%

I have worked out that on the mix three lines are required one for each switch position like so :-

CH5 100 SA SA^ Gear

+= 100 MAX SA-

+= 100 SA SAv

I have deleted the Input definition and this still works frown

It looks like the middle switch positions value is used for the servo output therefore this has to be changed to 100%, which is what MAX does above, with no need to change the offset from 0. The curve solution does exactly the same to the output in that it makes the value of SA- 100%.

In these situations I use the method that I understand and if I understand both then I use the simplest to implement. In this case adding the curve is an added complication so if I ever have a plane with retracts I will use the above.

I am finding this interesting! smiley

Cheers beer

Steve

Link to comment
Share on other sites

I had a revelation this evening too. As you say, the default outputs are +100%, 0, -100% for the three switch positions, so by adding a line with Weight -100% for the down switch position I was instructing it to do the opposite of its default behaviour -- i.e. it goes back to +100%, just as in the up position. Adding a weight to the middle position does nothing, for any percent of 0 is still zero.

I'm happy with the curve solution, for it's a single line instead of three smiley

Link to comment
Share on other sites

I am on holiday with no TX so am working from memory, but when turning a 3 pos switch into a 2 in OpenTX I think I use MAX on both sides I.e

CH5 100 MAX SA^ Gear

-100 MAX !SA^

(I know the syntax probably isn’t exactly right, but hopefully it gives you the general idea)

Link to comment
Share on other sites

That is interesting thinking

What should also work then is

CH5 100 SA SA^ Gear ' outputs -100% for SA^

+= 100 MAX !SA^ ' outputs +100% for both SA- and SAv

with the servo direction reversed to give Gear Up for SA^ else Gear Down.

SA- with a value of 0 has been the issue. Using MAX like this replaces the 0 with +100% which is the same as SAv which is +100% by default.

Just needs testing to prove the reasoning.

Cheers beer

Steve

Link to comment
Share on other sites

The output of a mix with a 3-pos switch as input is:

Switch up = -weight + offset
Switch middle = 0 + offset
Switch down = +weight + offset

In all cases the output is limited by the endpoint settings. Using a weight of 200% and an offset of +100% gives:

Switch up = -200 + 100 = -100
Switch middle = 0 + 100 = +100
Switch down = +200 + 100 = +300, but limited to +100 by the endpoint setting.

With an offset of -100:

Switch up = -200 + -100 = -300, but limited to -100 by the endpoint setting.
Switch middle = 0 + -100 = -100
Switch down = +200 + -100 = +100

Just a single mix line, no curves.

Mike

Link to comment
Share on other sites

Posted by Allan Bennett on 15/08/2020 17:37:25:

Is a Logical switch the only way to have the servo move direct from +100% to -100% when the switch is anything but up?

To answer this question - No

Using just the mix this works.

CH10 100 MAX !SA^

+= 100 SA SA^

Except the output moves from -100% to +100% which is easily corrected by reversing the servo on the output page, I am sure you knew that.

Cheers beer

Steve

Link to comment
Share on other sites

Posted by Mike Blandford on 16/08/2020 22:55:29:

The output of a mix with a 3-pos switch as input is:

Switch up = -weight + offset
Switch middle = 0 + offset
Switch down = +weight + offset

In all cases the output is limited by the endpoint settings. Using a weight of 200% and an offset of +100% gives:

Switch up = -200 + 100 = -100
Switch middle = 0 + 100 = +100
Switch down = +200 + 100 = +300, but limited to +100 by the endpoint setting.

With an offset of -100:

Switch up = -200 + -100 = -300, but limited to -100 by the endpoint setting.
Switch middle = 0 + -100 = -100
Switch down = +200 + -100 = +100

Just a single mix line, no curves.

Mike

Thanks Mike, that makes it more understandable for me. But the concept of using 200% weight and 100% offset is a bit too convoluted for my simple mind, so I think I'll stick with Bob's solution using a curve.

Steve, yes I'm happy with reversing it in the Output page, but is your second line a mis-type? I don't understand the SA SA^ bit.

Edited By Allan Bennett on 17/08/2020 08:41:23

Link to comment
Share on other sites

Whilst I did change the 3 position for a 2 position switch on my old Taranis the other TXs have stayed as supplied so I use the Weighting method as shown by Mike above. Very simple and as Mike says all contained in one mix line. I use the same for flap deployment on a 3 positioned switch where I want non proportional weighting for the switch positions.

Link to comment
Share on other sites

There are many ways to skin a cat in OpenTX and pretty much all ways are right as long as you understand how your method is working. One common oversight is that mix lines can be set with a function of add, replace or multiply. These give VERY different results!

One other way would be using a logic switch and overrides in special functions but I don't like this method as it's not as easy to find as putting it with the other controls on a mix line ready for when you forget how you set it up. In my case this could be any time after lunch.wink

Edited By Bob Cotsford on 17/08/2020 10:41:25

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...