APIs, concepts, guides, and more

◆ FilterGainTableSet()

void FilterGainTableSet ( int32_t gainTable)
FilterGainTableSet sets the gain table to be used by an axis. Gain tables are very useful if you want to set different filter coefficents (example: Ki, Kp, Kd, etc) all at once instead of setting various filter coefficients individually using FilterCoeffSet() \ For example, if you have a vertical axis that requires different filter coefficient when moving in the positive direction versus the negative direction (due to gravity). All you would need to do is use gain table 0 for positive direction, and then switch to gain table 1 for negative direction. You can use up to 5 gain tables per axis.
If you would like to set different gain tables for different areas of your motion profile such as acceleration, deceleration, constant velocity, and no motion, you should look into GainScheduling.
gainTableRange from 0 to 5.
Sample Code:
// axis will now use gain table 0
Go to axis screen->Tuning Parameters. Gain table is on the top right in image below.
See also