.

mpiFilterGainIndexSet

Declaration

 
long mpiFilterGainIndexSet(MPIFilter   filter,
                           long        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 MEIXmpSwitchType MEIXmpSwitchTypeMOTION_ONLY, the gain index is changed automatically by the firmware as described at MEIXmpSwitchType. 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 MEIXmpSwitchType MEIXmpSwitchTypeNONE, 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:

MEIFilterGainIndexNO_MOTION = 0,
MEIFilterGainIndexACCEL = 1,
MEIFilterGainIndexDECEL = 2, and
MEIFilterGainIndexVELOCITY = 3

To see information on gain indexes in non-standard firmware, see MEIFilterGainIndex.

   
 
Return Values  
MPIMessageOK  

See Also

MPIFilterConfig | mpiFilterConfigGet | mpiFilterConfigSet | MEIFilterGainIndex | MEIXmpSwitchType | mpiFilterGainIndexGet | mpiFilterGainGet | mpiFilterGainSet

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering