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.

F28069M using the position control problem (Encoder based)

Hello!

My set parameters

//User Motor Parameter
#define USER_MOTOR_TYPE                 MOTOR_Type_Pm
#define USER_MOTOR_NUM_POLE_PAIRS       (2)
#define USER_MOTOR_Rr                   (NULL)  // always NULL
#define USER_MOTOR_Rs                   (1.0278007)
#define USER_MOTOR_Ls_d                 (0.0011153606)
#define USER_MOTOR_Ls_q                 (0.0011153606)
#define USER_MOTOR_RATED_FLUX           (0.0780241)
#define USER_MOTOR_MAGNETIZING_CURRENT  (NULL)  // always NULL
#define USER_MOTOR_RES_EST_CURRENT      (1.0)
#define USER_MOTOR_IND_EST_CURRENT      (-1.0)
#define USER_MOTOR_MAX_CURRENT          (4.0)
#define USER_MOTOR_FLUX_EST_FREQ_Hz     (100.0)
#define USER_MOTOR_ENCODER_LINES        (5000.0)
#define USER_MOTOR_MAX_SPEED_KRPM       (3.0)
#define USER_SYSTEM_INERTIA             (0.02)//588516)
#define USER_SYSTEM_FRICTION            (0.01)//195453)

//Spintac Position.h Define
#define ST_MREV_ROLLOVER (10.0)
#define ST_EREV_MAXIMUM (1.0)
#define ST_POS_ERROR_MAXIMUM_MREV (2.0)

Velocity control is normal operation.

Position control command should command as follows:

gMotorVars.PosStepInt_MRev = 1;
gMotorVars.PosStepFrac_MRev = 1;
gMotorVars.RunPositionProfile = true;

The motor is rotating and one must stop. I want to control the position in Encoder-based (optical encoder, which is used 5000CPR)

Example) If the 3000 Position based on Optical Encoder Pulse, encHandle-> qepHandle-> Check the value QPOSCNT I want to control the position in 3000.

Q1. One should change any settings?

Q2. The request for a detailed explanation Mechanical Revolution [MRev] will roll over?

Q3. detailed description of the Electrical Revolution [ERev]?

Thank.

  • Hong,

    In InstaSPIN-MOTION it does not use absolute positioning.  All position commands are relative position steps.  This was done to simplify the software and allow you to apply your own absolute positioning system.

    In order to realize your goal to command the motor to absolute position 3000 you will need to look at the current motor position and find the step command which will rotate the motor from its current position to your absolute desired position.

    hong sungho said:
    Q1. One should change any settings?

    I'm not exactly sure what you are asking here.  There are a large number of setting you can change all are described in the lab projects.

    hong sungho said:
    Q2. The request for a detailed explanation Mechanical Revolution [MRev] will roll over?

    Mechanical revolutions will rollover from positive 10 to negative 10.  When this occurs the rollover counter is incremented.  Similary when the mechanical revolutions rollover from negative 10 to positive 10 the rollover counter is decremented.  I've attached an example plot that shows this in detail.  Additional information is in the User's Guide.

    4237.SpinTAC_Position_Move_Rollover.pdf

    hong sungho said:
    Q3. detailed description of the Electrical Revolution [ERev]?

    Electrical revolution is the units of electrical angle.  This is used to for the field oriented control so that the stator voltages can be oriented correctly onto the motor.  This signal varies between 0 and 1 and should represent the actual electrical angle of your motor.  This is accomplished with the alignment step that is performed when running resistance recalibration at startup.