Allan Bennett Posted April 10, 2023 Share Posted April 10, 2023 I wish to be able to have one of my channels (let's say ch6) switchable to 4 pre-defined positions, roughly 0, 33%, 66%, and 100%. The idea is that the first three values would be selected by a 3-way switch -- e.g. up = 0, mid = 33%, and down = 66%. The final 100% output would be selected/deselected by a flick of monentary switch SH. I'm familiar with how to program SH as an on/off toggle, but I can't see how to define ch6's outputs anything other than 0-50-100. My Tx is Tarans 9D+2019 and my receivers are FrSky X-series. Quote Link to comment Share on other sites More sharing options...
Philip Lewis 3 Posted April 10, 2023 Share Posted April 10, 2023 (edited) I don't own and never have owned an X9D but as no one else has answered you could probably most easily do this with flight modes but if you really want to use switches then the momentary (which can be a syicky switch would go on the top line weight 100% then if not true it would go to the next line 75% switch X up then 50% switch X mid then 33% switch X down. Hope that makes sense. Edited April 10, 2023 by Philip Lewis 3 Quote Link to comment Share on other sites More sharing options...
GrumpyGnome Posted April 11, 2023 Share Posted April 11, 2023 Never tried that but I expect you could use a custom curve for the three pos'n switch (0, 33, 66), with the momentary switch being 0 and 100. Fun to play in Companion! I'd have a go but I'm a little busy today......... Quote Link to comment Share on other sites More sharing options...
Max Z Posted April 11, 2023 Share Posted April 11, 2023 9 hours ago, Philip Lewis 3 said: the momentary (which can be a syicky switch would go on the top line weight 100% then if not true it would go to the next line 75% switch X up then 50% switch X mid then 33% switch X down. I am not sure that would work Philip. You will end up with two True conditions, 100% on top and , say 33% on one of the lower lines. The last one encountered will take precedence, so you will end up at whatever switch X is positioned for. If anything, you will have to make the 100% by the SH toggle the last line. And all mixer lines should be the "replace" type. Max. Quote Link to comment Share on other sites More sharing options...
Max Z Posted April 11, 2023 Share Posted April 11, 2023 (edited) Rereading Alan's opening post I realised that he probably does not know how to create fixed positions with just a switch as input. This can be done with a mixer and the "MAX" source, as in this example: Src = MAX, wt=66%, switch=X_down, multiplex = REPL No further Input or source needs to be defined. Edited April 11, 2023 by Max Z Quote Link to comment Share on other sites More sharing options...
MattyB Posted April 11, 2023 Share Posted April 11, 2023 (edited) Just use the MAX source paired with the relevant input weights to get the % you want via four different lines on the mix screen, one for each switch position. You will need to put the line related to SH at the top of the list to ensure it goes live whenever SH is activated, irrelevant of the position of the 3-pos switch. EDIT: Max’s posts above detail this well, sorry, our posts crossed. Edited April 11, 2023 by MattyB Quote Link to comment Share on other sites More sharing options...
Allan Bennett Posted April 11, 2023 Author Share Posted April 11, 2023 Thank you for all those replies. Following GrumpyGnome's reply (and before I saw the last two replies) I realised that curves will do the job for me. I just programmed some 2-point curves at the values I want the 4 outputs to be. Max Z and MattyB, you're right about my lack of knowledge of the use of the MAX function, though I now remember I have used it somewhre before! I'll play with that this afternoon. Thank you all. Quote Link to comment Share on other sites More sharing options...
Max Z Posted April 11, 2023 Share Posted April 11, 2023 Just a bit more info: The example I gave in my previous post shows the "Replace" operator as typical, but as the 3-position switch is multiple exclusive anyway, these lines could be the default "Add" operator. But "Replace" does not hurt. But the last line (not the first line Matty), the SH toggle, should definitely be "Replace". Btw I am using this excellent document from Mike Shellim as my reference. Max. Quote Link to comment Share on other sites More sharing options...
Philip Lewis 3 Posted April 11, 2023 Share Posted April 11, 2023 2 hours ago, Max Z said: I am not sure that would work Philip. You will end up with two True conditions, 100% on top and , say 33% on one of the lower lines. The last one encountered will take precedence, so you will end up at whatever switch X is positioned for. If anything, you will have to make the 100% by the SH toggle the last line. And all mixer lines should be the "replace" type. Max. On the inputs screen that definitely works, like a computer open tx looks for the first true condition and once it finds the first true condition then it looks no further so other true conditions lower down are ignored. As said above obviosly there are many different ways to achieve this. Quote Link to comment Share on other sites More sharing options...
Max Z Posted April 11, 2023 Share Posted April 11, 2023 20 minutes ago, Philip Lewis 3 said: On the inputs screen that definitely works, like a computer open tx looks for the first true condition and once it finds the first true condition then it looks no further so other true conditions lower down are ignored. I checked with the above referred document, and you are correct, that is how the input setup behaves. But at the same time, the mixer setup behaves as I explained, i.e. all the lines are processed top to bottom, irrespective of matches found. Quote Link to comment Share on other sites More sharing options...
Allan Bennett Posted April 11, 2023 Author Share Posted April 11, 2023 Thanks guys, I've now got what I want. This is what I've programmed so far, and it does what I expect. I've noted that the SH REPLACE line must be the bottom one, otherwise it doesn't always go to 100%. It's a simple switch at the moment, just for learning/testing. I'll be replacing it with a logic switch for the final version. Quote Link to comment Share on other sites More sharing options...
Philip Lewis 3 Posted April 11, 2023 Share Posted April 11, 2023 2 hours ago, Max Z said: I checked with the above referred document, and you are correct, that is how the input setup behaves. But at the same time, the mixer setup behaves as I explained, i.e. all the lines are processed top to bottom, irrespective of matches found. I personallt always put rates on the inputs screen and the advantage to putting weights on that screen is that you only put them on once for each contol and that will feed forward to aircraft with two servo aileron wing and twin servo elevator surfaces. Putting on the mixer screen means duplicating for each chanel. Many ways to do it and I'm not advocating ut just saying that is one way which does work. Quote Link to comment Share on other sites More sharing options...
Allan Bennett Posted April 11, 2023 Author Share Posted April 11, 2023 Job done! The fourth line is now := MAX Weight (+100%) Switch L04, where L04 is Sticky SHv SHv. Quote Link to comment Share on other sites More sharing options...
Max Z Posted April 11, 2023 Share Posted April 11, 2023 👍👍 Quote Link to comment Share on other sites More sharing options...
GrumpyGnome Posted April 11, 2023 Share Posted April 11, 2023 Many ways to 'skin a cat' in OpenTX/EdgeTX........ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.