I have a motor and encoder set up, but I cannot get any commands to rotate motor when using
rotor_mode = ROTOR_MODE_ENCODER
If I set
rotor_mode = ROTOR_MODE_SENSORLESS
Then I can get a current, velocity, or position command to turn the motor.
I have set the following and have verified that the encoder is properly counting using the ‘g 1 2’ command to get the rotor encoder state.
#define ENCODER_CPR (512*4)
#define POLE_PAIRS 12
static float brake_resistance = 0.0f; // [ohm]
I have played with the various pos & vel gain variables, but so far have not had any luck.
When using ROTOR_MODE_ENCODER the motor simply locks itself into the position and resists me manually turning it.
Does anyone have any ideas what could be my problem?