Other Parts Discussed in Thread: C2000WARE-MOTORCONTROL-SDK, C2000WARE
I am using an incremental encoder for position feedback with LAUNCHXL-F280049C and BOOSTXL-DRV8320, the example code I am using is based on is03_hardware_test in C2000WARE-MOTORCONTROL-SDK version 3.01.00.
However, when adding an offset so that the motor and encoder are aligned at electrical zero, the motor is spinning in reverse.
sensorhandle->qepsensor.RawTheta = EQEP_getPosition(qepBase) + sensorhandle->qepsensor.CalibratedAngle; // raw theta + offset
Where I have calculated sensorhandle->qepsensor.CalibratedAngle to be 580 for correct alignment.
Could this be caused by converting an int to float?