.

mpiFilterGainIndexGet

Declaration

 
long mpiFilterGainIndexGet(MPIFilter filter,
                           long      *gainIndex) 
 

Required Header: stdmpi.h

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 MEIXmpSwitchType MEIXmpSwitchTypeMOTION_ONLY, the gain index is automatically changed by the firmware as described at MEIXmpSwitchType. When the filter is in state MEIXmpSwitchType MEIXmpSwitchTypeNONE, 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:

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 | mpiFilterGainIndexSet | mpiFilterGainGet | mpiFilterGainSet |
Gain Tables

 

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