Making one channel's limits depend on another channel's position in Open9x

joshuabardwell

Senior Member
Mentor
I have a pan/tilt camera mount. When the camera is centered, it can only tilt down so far before it hits the nose of the plane. When the camera is panned to the side, it can tilt down much further to look past the side of the fuselage. I would like to have the downward limit of the tilt channel be related to the position of the pan channel, so that I am never stressing the servo by jamming the camera against the nose of the plane. This comes into play in part because I have a head tracker, so it would be pretty easy to accidentally look down too far without realizing it.

I figured it out. Here is how it's done. Hopefully this will be useful to somebody who is trying to learn to program their radio. You may need to invert some of the values (positive to negative and x > 0 to x < 0 or vice versa) depending on how exactly your system is set up, but the general concept should come through.

IN THE MIXER

CH5 - Source is TR5, which is the input on the trainer port that the head-tracker's pan control comes in on.

CH16 - This is a place-holder channel. Its purpose is to take the input from CH5 and convert it to the output value that we want to use as the limits for the tilt channel. Key values are:

Function = |x| This makes the tilt limit work the same when panning left or right.
Weight = -70 This is the maximum downward deflection that will occur when the camera is panned all the way to the side.
Offset = -30 This is the maximum downward deflection that will occur when the camera is centered.​

CH6 - This is the tilt servo's output channel. You need two mixes on this channel, one for tilting up (which is unrestricted) and one for tilting down.

CH6 Mix 1 (Tilting up)

Weight = 100
Function = X < 0​

CH6 Mix 2 (tilting down)

Weight = -GV1 (global variable--necessary because you can't assign the output of CH16 as the Weight for CH6, but you can assign CH16 to GV1, and GV1 to the weight)
Function = X > 0

IN THE SPECIAL FUNCTIONS SCREEN
Set one special function as follows:

Switch = ON
Action = Adjust GV1
Source = CH16
Enable = On​

That's it! If you care, you can see a video of it in action here: