This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8301-69M-KIT: Lab13b gMotorVars.SpinTAC.PosCtlErrorID

Part Number: DRV8301-69M-KIT

After the motor runs through the Identify in lab 13a or lab 13b,  gMotorVars.SpinTAC.PosCtlErrorID shows an error.  It is either error code 2 or error code 5.  I looked in the user manual and found ERR_ID Code table for SpinTAC Position Controll but I don't understand how to use the recommended solution and eliminate the error.

2 Invalid velocity reference maximum value Set cfg.VelMax within (0, 1]

5 Invalid control signal minimum value Set cfg.OutMin within [-1, 0)

  • 1. May I know if you have used lab02a to identify the motor paramters and lab12a to identify the motor inertia, and then set these parameters in user.h.
    2. Could you check if the connection and configuration of encoder is correct?
    3. For errorID=2, make sure that _IQ24(USER_MOTOR_MAX_SPEED_KRPM * ST_SPEED_PU_PER_KRPM)) is within [_IQ(0,0), _IQ(1,0)].
    4. For errorID=5, make sure that _IQ24(USER_MOTOR_MAX_CURRENT / USER_IQ_FULL_SCALE_CURRENT_A) is within [_IQ(0,0), _IQ(1,0)].
  • Yanming,

    1. May I know if you have used lab02a to identify the motor paramters and lab12a to identify the motor inertia, and then set these parameters in user.h.

    Yes, the motor I am using at the moment is a production motor which we identified successfully a couple years ago.  I actually use Lab02c because it is considered a low inductance motor.  I ran it again and the values seem reasonable.  

    It did identify the inertia and friction for both Lab05c and Lab12a with the following results.  I do not know the actual inertia of the motor but the 2 labs seem to compare ok.

    2. Could you check if the connection and configuration of encoder is correct?  

    I don't really know what is really correct since I bought the encoder and is separate from the motor.  If there was something incorrect, would Lab12a not identify the inertia?

    3. For errorID=2, make sure that _IQ24(USER_MOTOR_MAX_SPEED_KRPM * ST_SPEED_PU_PER_KRPM)) is within [_IQ(0,0), _IQ(1,0)]. 

    USER_MOTOR_MAX_SPEED_KRPM was 8.0 which was too high because of the "new" calculation for USER_IQ_FULL_SCALE_FREQ_Hz instead of the fixed value.  I changed USER_MOTOR_MAX_SPEED_KRPM = 7.0 and is good for now.


    4. For errorID=5, make sure that _IQ24(USER_MOTOR_MAX_CURRENT / USER_IQ_FULL_SCALE_CURRENT_A) is within [_IQ(0,0), _IQ(1,0)].

    This ratio was valid (127/128) but it did not like USER_IQ_FULL_SCALE_CURRENT_A=128 according to my software engineer.  Changed it to 127 and reduced USER_MOTOR_MAX_CURRENT slightly to maintain [_IQ(0,0), _IQ(1,0)].  Everything is good now.

    Thanks

  • Hi Mike,

    It seems like the motor parameters and inertia identification are good, the connection of motor and encoder lines is also correct since the lab02c/lab05/lab12a worked well. Please go ahead and let me know if you have any further questions.