Mixing/programing

Programing help and example for all firmwares based on thus's th9 firmware.
Post Reply
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Mixing/programing

Post by larsra »

Hey!
I've read arround to try figure my problem, but cant really seem to find a soulution.
Problem: I want to mix a chanel(that runs a motor) up against three chanels, and the motor needs to run one way independent on which way the stick goes.

As it is now, I can only get the motor to run when the stick goes in one direction.

Thanks for any answear:)

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mixing/programing

Post by MikeB »

For the motor channel, try using a CURVE in the mix. Set the curve to 100 0 -100 0 100.
With the throttle stick in the middle, the motor will be off, moving it either way will start the motor.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

Hey Mike, and thanks alot, it works great!

Lars R.A.
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

I tried the mixing today but something wierd happens. For example I mix THR in at CH 5(motor) adding curve c1 with the values you said, and the mix works fine. At my "exit" screen I can see the movements of all 8ch, from -100 to 100, and along with the THR movement, the ch5 moves from -100 to 100. But as soon as I start add more chanels to the mixing, chanel 5 moves less. If I mix two chanels in to ch5, ch5 only goes from -100 to 10ish(very small movement at motor). If I mix three chanels, ch5 only goes from -100 to -10ish(the motor doesnt move at all). So, is it something wrong with the curves vs mixing? The way I do it, I set up three curves with the same values 100 0 -100 0 100. When I mix THR into ch 5 I use curve c1. Then I "add" ELE using curve c2, and last I "add" RUD using c3. The way it does work, is if I take the THR stick one way, at the same time I take RUD one way, the motor runs.
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mixing/programing

Post by Kilrah »

Can you post the file you're working on? It's a bit hard to understand from the description...

larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

Done! and it's the er9x program, as I forgot to mention:)
Attachments
Cat-Liebherr.eepe
(2.36 KiB) Downloaded 406 times
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mixing/programing

Post by Kilrah »

Hmm, is it me or does that file have 2 models with totally empty mixers?

Won't help much in trying to understand what you want to do ;)
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

Thats strange, they'r not empty at my screen or physicly at the TX.

Attached another file, see if that one works.
Attachments
cat-lieb 2.eepe
(2.36 KiB) Downloaded 389 times
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mixing/programing

Post by Kilrah »

Oh sorry, it was on my side, I read ersky9x...

Sooo... What you're doing here is adding 3 inputs onto CH5, 3 times with the same curve.
Curves are output vs input, so on the X axis you have the stick, and Y is the output.

Currently with those curves, when the ELE and AIL sticks are centered each of those contribute by -100% to the output. The THR stick, when at the highest setting, will contribute by +100%. If you add the 3, (-100)+(-100)+100 = -100. So with the AIL and ELE sticks are centered, the output will be -100% whatever the position of the THR stick.

Now I still don't understand what you want to do, but most likely not that. Maybe it's best to describe the actual model and what you want it to do?
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

Ok, I havent really got the idea how the curve function works, except that they control the output. I can take it from the start. The two models are an scale excavator and a wheel loader, powered by hydraulic. At the excavator I got three servos which open/close a valve. And whenever I open a valve, I need the hydraulic pump to start. So what I'm trying to do, is mix those three servos up against the motor :)

The valve works like this:
stick up(or left)/ stick center / stick down(or right)
open / close / open
Last edited by larsra on Mon Feb 25, 2013 3:25 pm, edited 1 time in total.
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mixing/programing

Post by Kilrah »

And the motor is just on/off?
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

No, it has an ESC infront. So the speed will follow the movement on the stick. If you mix THR into ch 5, with curve 100 0 -100 0 100. That's the way it should work, only with two more chanels.
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mixing/programing

Post by Kilrah »

Maybe something like this then? Am I right that your THR stick returns to center, not like on the typical airplane setup?

ELE, AIL and THR will both contribute to 50% of throttle, so if you've got one valve fully open the pump runs at 50%, with 2 fully open it runs at 100%, so that you're not at full power with just one semi-open valve, is it any good?
Attachments
test2.eepe
(1.33 KiB) Downloaded 387 times
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

You'r right that the stick returns to center, and the program is just like it should be. It would ofcourse be the best to have 100% power even with only one stick in movement. You think that is possible with enough testing? Or isn't that possible with the er9x
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Mixing/programing

Post by MikeB »

You need a custom switch. Move the mixes on channel 5 to (say) channel 16.
Add a mix on channel 5:
CH05 +100% FULL Switch(SW1)
Add a custom switch:
CS1: v>ofs CH16 -99
Now, as soon as channel 16 comes past -99%, channel 5 will turn on at +100%

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mixing/programing

Post by Kilrah »

That's why I asked if the pump should only be ON or OFF, but I was answered no. Probably I didn't make myself clear enough, but that's why I've kept it proportional. If he had an ESC it made sense to me not to have the pump turning at full power when valves are only barely open.
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

That's right Kilrah. Your sugestion, Mike, makes ch 5 100% all the time.
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Mixing/programing

Post by Kilrah »

OK. Then to have 100% with just one stick just duplicate each of the mixers on CH5, except the last (-100% HALF).
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

That fixed the problem, now the program is 100% :) Really appreciate all the help from you guys! DId not know that it was so that much troubles to get it up working.
larsra
Posts: 18
Joined: Sun Feb 24, 2013 9:11 pm
Country: -

Re: Mixing/programing

Post by larsra »

Ripping up in a old case! The program stil works great, but I want to add a function, to get the tracks on the excavator to work. What I got in mind, is: When I tap a switch at right side, the right stick will oversteer the "original" function and control the right belt. And the same at the left belt. Anyone got any sugestion? I've tried and failed, but I have never flyed plane or helicopter, so I'm not familure with the functions unfortunatly. Appreciate all comments :)
Attachments
cat-lieb working.eepe
(2.36 KiB) Downloaded 360 times
manfred59
Posts: 1
Joined: Thu Aug 13, 2015 4:16 pm
Country: -

Re: Mixing/programing

Post by manfred59 »

Did you solve the problem with the two switches to override the funktion of channel one?

Post Reply

Return to “er9x / gruvin9x / th9 based firmwares”