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.

Lab 13A - PosCtlerrorID = 2 & PositionError_MRev not updating.



I successfully completed labs 12a and 12b, the encoder feedback and velocity calculation looked accurate.

I have moved onto lab 13a to achieve sensored positional control and have found a sticking point. After setting 'Flag_enableSys = true' and 'Flag_Run_Identify = true' the Rs Estimation state changes to online. After a few seconds in this state the rotor moves and the value 'gMotorVars.SpinTAC.PosCtlErrorID' is set to = 2.

I have been unable to identify what this error ID means when referencing the Instaspin Guides.

If I manually turn the rotor I also see that the PositionError_MRev does not change value. The associated QEP QPOSCNTregister is updating.

Any help to get through this lab would be appreciated,

Khal

  • Khalid,

    Khalid Aljohari said:
    I have been unable to identify what this error ID means when referencing the Instaspin Guides.

    In looking at the InstaSPIN User's Guide (SPRUHJ1F) in section 12.4.5 Troubleshooting SpinTAC Position Control, it says that ErrorID 2 means that the velocity reference maximum value it out of range.  It should be between 0 and 1 in scaled velocity.  My guess is that your USER_MOTOR_MAX_SPEED_RPM is greater than 1 when it is scaled by ST_SPEED_PU_PER_KRPM.  Manually run this calculation and make sure it is configured correctly.  

    Khalid Aljohari said:
    If I manually turn the rotor I also see that the PositionError_MRev does not change value. The associated QEP QPOSCNTregister is updating.

    If SpinTAC Position Control is not running the position error won't be calculating.

  • Thanks that was it. I adjusted the value I had entered for USER_MOTOR_MAX_SPEED_KRPM as it was giving a value greater than 1 when scaling. The lab worked fine after that.

    Regards