.

MPIFilterGain

Definition

 
typedef struct MPIFilterGain {
   MPIFilterCoeff  coeff[MPIFilterCoeffCOUNT_MAX];
} MPIFilterGain;

Description

 
coeff

see MPIFilterCoeff

Sample Code

/* Sets reasonable tuning parameters for a Trust TA9000 test stand */
void setPIDs(MPIFilter filter)
{
MPIFilterGain gain;
long returnValue;
returnValue = mpiFilterGainGet(filter, 0, &gain); msgCHECK(returnValue); gain.coeff[MEIFilterGainPIDCoeffGAIN_PROPORTIONAL].f = (float)100; gain.coeff[MEIFilterGainPIDCoeffGAIN_INTEGRAL].f = (float)0.2; gain.coeff[MEIFilterGainPIDCoeffGAIN_DERIVATIVE].f = (float)1000;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_POSITION].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_VELOCITY].f = (float)45;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_ACCELERATION].f = (float)101000;
gain.coeff[MEIFilterGainPIDCoeffFEEDFORWARD_FRICTION].f = (float)450;
gain.coeff[MEIFilterGainPIDCoeffINTEGRATIONMAX_MOVING].f = (float)15000;
gain.coeff[MEIFilterGainPIDCoeffINTEGRATIONMAX_REST].f = (float)15000;
gain.coeff[MEIFilterGainPIDCoeffDRATE].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_LIMIT].f = (float)32767;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_LIMITHIGH].f = (float)32767;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_LIMITLOW].f = (float)-32767;
gain.coeff[MEIFilterGainPIDCoeffOUTPUT_OFFSET].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffNOISE_POSITIONFFT].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffNOISE_FILTERFFT].f = (float)0;
gain.coeff[MEIFilterGainPIDCoeffNOISE_VELOCITYFFT].f = (float)0; returnValue = mpiFilterGainSet(filter, 0, &gain);
msgCHECK(returnValue);
}

See Also

MPIFilterGainCOUNT_MAX | MEIFilterGainPIDCoeff | MEIFilterGainPIVCoeff

 

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