mpiFilterGainIndexGet

Declaration

int32_t mpiFilterGainIndexGet(MPIFilter filter,
                           int32_t      *gainIndex)

Description

mpiFilterGainIndexGet gets the current gain index of a Filter (filter) and writes it to the location pointed to by gainIndex. Reading the gain index tells you what gain table is being used currently.

If the filter is in state MPIFilterSwitchTypeMOTION_ONLY, the gain index is automatically changed by the firmware as described at MPIFilterSwitchType. When the filter is in state MPIFilterSwitchTypeNONE, the gain index is controlled by the user.
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 | mpiFilterGainIndexSet | mpiFilterGainGet | mpiFilterGainSet | Gain Tables