Contents

Previous

Next

Last

The Scale Function

The "SCALE" function is used to set the scaling parameters on the fly for both the CMS controls and the actual controllers. This will override any scaling parameter set in the GUI except the "Centered" flag. This includes deadzone, sensitivity, gain curve, etc. normally set in the Axis Dialog for the device. The result of the SCALE function remains in effect until another SCALE function is executed.

The SCALE statement might look like this:

SCALE( CMS.A1, 100, 5, GAIN6 );

The first parameter specifies which axis to apply the scaling parameters to, in this case CMS.A1. The second parameter is the "Sensitivity" value and can have values of -100 to 100. It is a percent value. The third parameter is the DeadZone parameter and is also a percent value. The last value is the GAIN value and can be anything from GAIN1 to GAIN11. These correspond to the 11 gain settings that can be applied in the GUI. GAIN6 is flat, the one that's a straight line from the lower left to the upper right corners of the Gain display in the GUI. GAIN1 through GAIN5 are less sensitive towards center and more sensitive toward the ends. GAIN7 through GAIN11 are to opposite, being more sensitive toward center and less sensitive towards the ends.

Using SCALE sets the gain through all three modes in a multi-mode program. If a particular response is desired regardless of what the controller is doing (the most common case) the parameters can simply be set in the GUI and left alone. The SCALE statement is only needed when you want to change the stick response on the fly, perhaps you want to have normal control for flying but fine control for landing. For an example of how you might accomplish this, see the Sample Scripts section.