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.

TMS320F28027F: Using InstaSPIN in Open Loop

Part Number: TMS320F28027F

Hi All,

I've tried proj_lab01 which demostrates Open loop control and it's working fine. I'm facing difficulty in setting the required speed and acceleration time. I've set the speed using
  gMotorVars.SpeedRef_krpm = _IQ(1.0);
This generates a frequency of 66.6 Hz (checked in scope). How do I calculate the value for SpeedRef_krpm for getting the desired frequency in Hz.

Is it possible to change the ramp during run-time? Whether I should use ANGLE_GEN module or TRAJ module? If so, how do I configure it to achieve a given ramp in Hz.

NOTE: All the above in Open loop only using Volts/Hz principle.

Thanks,
Prakash

  • I suppose you are using lab01b. The reference speed (rpm) = reference frequency (Hz)*60/pole pairs, you may set gMotorVars.MaxAccel_krpmps to change the acceleration, and gMotorVars.SpeedRef_krpm change the target running frequency. Below lines code in main loop will use both variables.

    // set the speed reference
    CTRL_setSpd_ref_krpm(ctrlHandle,gMotorVars.SpeedRef_krpm);

    // set the speed acceleration
    CTRL_setMaxAccel_pu(ctrlHandle,_IQmpy(MAX_ACCEL_KRPMPS_SF,gMotorVars.MaxAccel_krpmps));
  • Thanks for the clarification Yanming. I'm able to control both frequency and acceleration now.