mpiFilterGainIndexSet
Declaration
int32_t mpiFilterGainIndexSet(MPIFilter filter, int32_t gainIndex)
Required Header: stdmpi.h
Description
mpiFilterGainIndexSet sets the current gain index of a Filter (filter) to gainIndex. Writing the gain index controls what gain table is currently being used.
If the filter is in state MPIFilterSwitchType MPIFilterSwitchTypeMOTION_ONLY, the gain index is changed automatically by the firmware as described at MPIFilterSwitchType. Be aware that the filter can change the gain index in real-time, thereby overwriting your changes in this mode.
When the filter is in state MPIFilterSwitchTypeNONE, the gain index is controlled by the user. This is the normal state when using mpiFilterGainIndexSet(...). Gain Scheduling is a feature that switches filter gains for the acceleration, deceleration, constant velocity, and idle states of motion. The post filters are not affected by gain scheduling. Standard algorithms are used with gain scheduling (PID, PIV).
filter A handle to a Filter object. gainIndex The index number of the filter gain table. Unless you are using gain tables, set this value to 0. If you are setting gain tables in Motion Console, this is the drop down box in Filter Summary->Coeffs that says "Gain Table 0", "Gain Table 1", etc. In standard firmware, the gain table indexes are in the following order: MPIFilterGainIndexNO_MOTION = 0, MPIFilterGainIndexACCEL = 1, MPIFilterGainIndexDECEL = 2, and MPIFilterGainIndexVELOCITY = 3 To see information on gain indexes in non-standard firmware, see MPIFilterGainIndex.
Return Values |
---|
MPIMessageOK |
See Also
MPIFilterConfig | mpiFilterConfigGet | mpiFilterConfigSet | MPIFilterGainIndex | MPIFilterSwitchType | mpiFilterGainIndexGet | mpiFilterGainGet | mpiFilterGainSet