Application Description:
Motor Control of an Induction motor using a Scalar V/F scheme. The requirement to measure speed from 30 rpm to 2800 rpm with the 200/256 cpr ecoder/disc installed.
Problem and Issues
- For low speeds, the 16-bit QCPRD register I am reading overflows and thus I am reading erroneous values.
- I feel the descriptions for the functions defined in the eqep.h/eqep.c are insufficient. Clarification regarding their purpose would be appreciated.
- The example code in example_eqepEdgeCapture.c does not use the "standard" functions generated by HALCoGen (Code exerpt below). Is there a reason for that?
/* Status flag is set to indicate that a new value is latched in the QCPRD register. */ if((eqepREG1->QEPSTS & 0x80U) !=0U) { /* Elapsed time between unit position events */ deltaT = eqepREG1->QCPRD; /* Calculate Velocity from deltaT and the value of the unit position. */ /* The value of Unit Position is a sample value and should be changed by the User as per the actual value in the UNIT_POSITION_X macro above. */ velocity = (float)(UNIT_POSITION_X/deltaT); /* Clear the Status flag. */ eqepREG1->QEPSTS |= 0x80U; }
- What would be the suggested/recommended settings for the EQEP module in HALCoGen for such an application.
Thanks
Safi