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.

gMotorVars.SpinTAC.PosPlanErrorID 3004

Genius 5910 points

Hi,

 I'm playing with lab13c to see how fast the controller can be.

 I increased the values of: VelLim[pups], AccLim[pups2], DecLim[pups2], JrkLim[pups3]

 in STPOSPLAN_addCfgTran

Now I got this error. Where can I find the explanation and what does it mean.

 What are the max values of  VelLim, AccLim, DecLim, JrkLim and why?

 Thanks,

  • Ernst,

    In the InstaSPIN User's Guide (spruhj1), Section 13.8 we talk about the error codes associated with SpinTAC Position Plan.  The 3004 error means that there is a configuration error in the STPOSPLAN_addCfgTran function.  You should be able to get some additional information from these variables:

    gMotorVars.SpinTAC.PosPlanCfgErrorIdx - This tells you which function call of STPOSPLAN_addCfgTran caused the error
    gMotorVars.SpinTAC.PosPlanCfgErrorCode - This tells you specifically what the error is

    The max values for VelLim, AccLim, DecLim, & JrkLim are determined by the maximum limits given to the profile generator.  These can be found in the function ST_setupPosMove in the spintac_position.h file.

    The default limit maximums are setup as follows:

    VelLim - Motor Max Speed as defined in USER_MOTOR_MAX_SPEED_KRPM, scaled into pu/s
    AccLim - 10 pu/s^2 to prevent overflow when converting to krpm/s
    DecLim - 10 pu/s^2 to prevent overflow when converting to krpm/s
    JrkLim - 62.5 pu/s^3 to prevent overflow when converting to krpm/s^2

    These limit maximums can be raised to the full numerical limits if the conversion between pu/s and krpm is abandoned.  

    The numerical limits are defined as follows:

    VelLim - 1.0 pu/s
    AccLim - 120 pu/s^2
    DecLim - 120 pu/s^2
    JrkLIm - 2000 pu/s^3

    To enable transitions at these maximums the code needs to be modified in a couple places.

    1. The values in ST_setupPosMove in spintac_position.h need to be changed to the desired limits.

    2. In ST_runPosMove, the IQmpy & IQ20mpy with the scale factor ST_SPEED_PU_PER_KRPM needs to be removed.

    3. In ST_runPosPlan the IQmpy & IQ20mpy with the scale factor ST_SPEED_KRPM_PER_PU needs to be removed

    4. At this point you should be able to use the numerical limits as the maximum values for your profile.  But it is important to note that the definitions for the variables in gMotorVars has now changed from krpm to pu.

  • Adam,

     The problem is back. I have again the error 3004. I reduced the profile below the specified limits.

      I have also gMotorVars.SpinTAC.PosPlanCfgErrorCode 32

     On page 471 from document SPRUHJ1F  there is no error 32.

    Can you please give me a hint what the problem is?


    Thank

     

  • Evs,

    The errors in Plan can be slightly confusing.  The ERR_ID tells you which function caused the error in table 13-6.  So 3004 is from STPOSPLAN_addCfgPlan.  But the 32 tells you the specific issue.  This information is in table 13-7 on page 474.  So the 32 tells you that the VelLim was configured incorrectly.  Make sure that this value is less than the VelMax that you configured.

  • Wow that is a fast reply. Thanks.