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.

  • TI Thinks Resolved

CCS/TIDM-1003: TIDM-1003 Throttle

Expert 5480 points

Replies: 3

Views: 294

Part Number: TIDM-1003

Tool/software: Code Composer Studio

Hi,

Do I need to modify the default code to enable the system and connect the throttle to use as a stand alone circuit?

 

To start the motor in CCS, I have to click in enable system and set it to 1, then click on run and set it to one, then click on SpeedRef_krpm and set it to a value to control speed.

 

When I cycle power however, the board is not controlling any speed nor does the throttle have any effect. My thought is that enable and run have to be hard-coded to 1 in order to use this board outside of CCS. Is that so? Also, there appears to be no link in the code between throttle.result and gMotorVars.SpeedRef_krpm. Is this a line I will need to add?

 

Thank you in advance and best regards,

 

Sean

 

P.S., here is where I expected this link, around line 400 in TIDM-1003.c

 

 

// 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));

        if(Flag_Latch_softwareUpdate)

        {

          Flag_Latch_softwareUpdate = false;

          USER_calcPIgains(ctrlHandle);

          // initialize the watch window kp and ki current values with pre-calculated values

          gMotorVars.Kp_Idq = CTRL_getKp(ctrlHandle,CTRL_Type_PID_Id);

          gMotorVars.Ki_Idq = CTRL_getKi(ctrlHandle,CTRL_Type_PID_Id);

          // initialize the watch window kp and ki values with pre-calculated values

          gMotorVars.Kp_spd = CTRL_getKp(ctrlHandle,CTRL_Type_PID_spd);

          gMotorVars.Ki_spd = CTRL_getKi(ctrlHandle,CTRL_Type_PID_spd);

        }

      }

      else

      {

        Flag_Latch_softwareUpdate = true;

        // the estimator sets the maximum current slope during identification

        gMaxCurrentSlope = EST_getMaxCurrentSlope_pu(obj->estHandle);

      }

 

      // when appropriate, update the global variables

      if(gCounter_updateGlobals >= NUM_MAIN_TICKS_FOR_GLOBAL_VARIABLE_UPDATE)

      {

        // reset the counter

        gCounter_updateGlobals = 0;

        updateGlobalVariables_motor(ctrlHandle);

      }

      {

        THROTTLE_setup(throttleHandle,

                      gAdcData.Throttle,

                       false,

                       false);

        THROTTLE_runState(throttleHandle);

      }

  • The reference design didn't link the throttle input to the reference speed setting by default, the throttle is disabled and was not tested in the project since customer maybe uses a different throttle in themselves product, so the program code can't run with throttle out of CCS. You have to add some codes to support the throttle if you want to use it.
  • In reply to Yanming Luo:

    What about the two enable bits?
  • In reply to Sean Cashin:

    Both two are for testing and special using, a customer can re-define the function based on their throttle, the function is for a special throttle input, not a standard function, so it's not linked to the speed input in the final project.

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.