Gyro gain trim (sorry FDR!!)

More
08 Jul 2013 20:30 #12107 by myxiplx
Gyro gain trim (sorry FDR!!) was created by myxiplx
Ok, this is bugging me. Following on from the idle throttle trim, I've created a trim setting for Gyro gain.

The idea is to have GEAR0 as the switch for rate mode, and GEAR1 as the switch for heading hold, with the rudder trim able to set the actual gain value.

With the switch in the GEAR0 position it works great, but as soon as I flick it to GEAR1 the only figure I get is 0.

As far as I can see everything is configured properly, I've tried editing the settings in the TX and in the ini file, but no matter what I try I can't get the figures working now with GEAR1 set.

Any ideas??

File Attachment:

File Name: model2_201...08-2.ini
File Size:20 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
08 Jul 2013 20:43 - 08 Jul 2013 20:44 #12109 by FDR
Replied by FDR on topic Gyro gain trim (sorry FDR!!)
Here you are...

Set the scale of the first page as required for the rate mode.
Attachments:
Last edit: 08 Jul 2013 20:44 by FDR.

Please Log in or Create an account to join the conversation.

More
09 Jul 2013 07:30 #12123 by myxiplx
Replied by myxiplx on topic Gyro gain trim (sorry FDR!!)
Hmmm, it's working better now, with any type of curve. I honestly can't see what was wrong with my earlier settings.

Looking at the model2.ini file though I have a whole bunch of NUL characters at the bottom of the file, could that have been causing problems?

Please Log in or Create an account to join the conversation.

More
09 Jul 2013 07:46 #12126 by FDR
Replied by FDR on topic Gyro gain trim (sorry FDR!!)
No, the nuls are only placeholders, because the filesystem implementation in the tx can't create and resize files...

I guess the problem was that the Virt2's inverted transfer function (-100,0,+100) and the added trims neutralized themselves...
You could switch off adding the trims.
BTW did I switch the trim off?

Oh, and I changed the page order, since you wrote you want to adjust the HH rate in case of the GEAR1...

Please Log in or Create an account to join the conversation.

More
09 Jul 2013 07:56 #12128 by myxiplx
Replied by myxiplx on topic Gyro gain trim (sorry FDR!!)
Ok, I think I'm going to stick to the few methods that I know work. It sounds like this trim technique interacts with some of the output curves.

I didn't see anywhere in the settings where the trims were turned off. What I'm using now gives me the ability to trim Virt2 from -100 to +100 in both modes.

I use GEAR1 to turn on heading hold mode, and I wanted this to output positive values with the trim graph set to the right. That's working very nicely now. In the future I may configure separate trims for HH and rate mode, but for now GEAR1 just switches between positive and negative values.


[channel5]
template=complex
[mixer]
src=Virt2
dest=Ch5
[mixer]
src=!Virt2
dest=Ch5
switch=GEAR1


[virtchan2]
template=simple
[mixer]
src=Virt2
dest=Virt2
scalar=0
curvetype=fixed


[trim3]
src=Virt2
pos=TRIMLH+
neg=TRIMLH-
step=5
value=-40


The only thing I'm a little confused about now are the steps. This trim is set to steps of 0.5, but my trim output adjusts by 1 with each click of the button.

Please Log in or Create an account to join the conversation.

More
09 Jul 2013 08:13 #12130 by FDR
Replied by FDR on topic Gyro gain trim (sorry FDR!!)

myxiplx wrote: The only thing I'm a little confused about now are the steps. This trim is set to steps of 0.5, but my trim output adjusts by 1 with each click of the button.


That probably means that the trims are not turned off, so they are added once more to the value, which already contains the trims. Turn off the trims with the "Trim" button at the bottom of the page, it should show "No Trim" then...

Please Log in or Create an account to join the conversation.

More
09 Jul 2013 12:42 #12137 by myxiplx
Replied by myxiplx on topic Gyro gain trim (sorry FDR!!)
Aaah, ok. Let me check I'm understanding this correctly:

Trims
  • Trims will apply to any mixer configured to use that input.
  • Virtual channels use mixers too, so trims also apply here.
  • If you have a complex mixer that is adding or multiplying channels together, or otherwise using two channels, trims may be applied twice as they effect each individual mixer.
  • To avoid trims being applied more than once, you can set 'usetrim=0' as a paramter of individual mixers.

Trims and Virtual Channels
  • A virtual channel may use itself as an input, effectively causing it to save it's value.
  • Trims may be applied to a virtual channel configured in this way, allowing it to be adjusted in real-time to any fixed value.
  • When using trims and virtual channels in this way, be wary of the curve applied. Anything other than 1-to-1 seems to result in any trim being re-applied in a loop. This means any trim other than 0 causes the output to cycle either down to -100 or up to +100.

Please Log in or Create an account to join the conversation.

More
09 Jul 2013 13:17 #12140 by FDR
Replied by FDR on topic Gyro gain trim (sorry FDR!!)
You are really close, may be closer then me! ;)

Trims will apply to any mixer configured to use that input.

Right.
The trims are always applied on the simple and expo&dr mixer templates, but you can switch them off on the complex mixer templates.

Virtual channels use mixers too, so trims also apply here.

Yes, but I think it is not neccesary to make mixers for the virtual channels.
In theory configuring the trims for the virtual channel and then use that virtual channel as the source on a mixer page might be sufficient.
You can try, it may further simplify your config...

If you have a complex mixer that is adding or multiplying channels together, or otherwise using two channels, trims may be applied twice as they effect each individual mixer.

If both pages have the same source, yes.

To avoid trims being applied more than once, you can set 'usetrim=0' as a paramter of individual mixers.

Yes, but you can do it on the GUI too, by changing the "Trim" button to "No Trim"...

A virtual channel may use itself as an input, effectively causing it to save it's value.

Ice starts to get thinner here: I can't say for sure, but it is not needed to achieve an "analogue" channel with the help of a virtual channel and trims.

Trims may be applied to a virtual channel configured in this way, allowing it to be adjusted in real-time to any fixed value.

Trims may be applied to any channel according to your firt point:

Trims will apply to any mixer configured to use that input.


When using trims and virtual channels in this way, be wary of the curve applied. Anything other than 1-to-1 seems to result in any trim being re-applied in a loop. This means any trim other than 0 causes the output to cycle either down to -100 or up to +100.

I'm not sure I got it, but I think the problem may lie in that I made a mixer for that virtual channel...

Please Log in or Create an account to join the conversation.

Time to create page: 0.041 seconds
Powered by Kunena Forum