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.

hv kit with 69f control card

Other Parts Discussed in Thread: MOTORWARE, TMS320F28069M, TMDSHVMTRINSPIN

dear please;

1- with lab7: i need to export the d-flux and q-axis cuurent to ([Main]-J14, DAC-1 to 4) To monitor internal signal values in real time PWM DACs.

how can i do that?

2- for user.h what are the parameters and setting for ACI and HVKIT?

thanks

  • 1. 

    there is a pwmdac.h driver

    the drv.h includes DRV_writeDacData()

    and the drv_obj.h includes a use case for the _writeDacData

    2. The Marathon/GE motor that is sold as HVACIMTR is listed in the user.h as 

    USER_MOTOR == Marathon_5K33GN2A

  • thank you very much;

    for the _writeDacData can you expline how can i write the iqs and ids!!! i can not do it!

    thanks

  • As an example, here is how we get the values in our updateGlobalVariables_motor() function:

      // read Id and Iq vectors in amps
      gMotorVars.Id_A = _IQmpy(CTRL_getId_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
      gMotorVars.Iq_A = _IQmpy(CTRL_getIq_in_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));

     

    the DRV_writeDacData() is expecting the values in the DacData structure, where it converts from IQ to IQ15 and writes the value to the PWM you are using.

    static inline void DRV_writeDacData(DRV_Handle handle,DRV_DacData_t *pDacData)
    {
      DRV_Obj *obj = (DRV_Obj *)handle;

      // convert values from _IQ to _IQ15
      int16_t dacValue_1 = (int16_t)_IQtoIQ15(pDacData->value[0]);
      int16_t dacValue_2 = (int16_t)_IQtoIQ15(pDacData->value[1]);
      int16_t dacValue_3 = (int16_t)_IQtoIQ15(pDacData->value[2]);
      int16_t dacValue_4 = (int16_t)_IQtoIQ15(pDacData->value[3]);

      // write the DAC data
      PWMDAC_write_CmpA(obj->pwmDacHandle[PWMDAC_Number_1],dacValue_1);
      PWMDAC_write_CmpB(obj->pwmDacHandle[PWMDAC_Number_1],dacValue_2);
      PWMDAC_write_CmpA(obj->pwmDacHandle[PWMDAC_Number_2],dacValue_3);
      PWMDAC_write_CmpA(obj->pwmDacHandle[PWMDAC_Number_3],dacValue_4);

      return;
    } // end of DRV_writeDacData() function

  • Thank you very much

    sorry 1- I need to know in your default programs which values have been write to ([Main]-J14, DAC-1 to 4) ?

    2- how can i determine dacValue_1, dacValue_2, dacValue_3 and dacValue_4; it is not clear to me!!!?

    3- in hvkit docouments the ADC 1-4 are pwm6A, 6B, 7A and 7B! this is true? 

    thanks

  • 1. I don't think we are attching anything to the DAC headers by default in our MotorWare projects

    2. These are the variables that you want to bring out to the pins, whatever they are. It looks like you want to show some current values, so you will need to get those values and put them into the dac structure.

    3. From the schematic you can see that PWM6a/b (DIMM pins 29/79) and PWM7a/b (30/80) are used as the DAC outputs to J14.

  • Hello,

    1. As far as I know, DRV_writeDacData is not used in the example program so you should add this line by your self in the code.

    2. Like Chris has mentioned, in updateGlobalVariables_motor(), you can get (or add the lines to get) gMotorVars.Id_A and gMotorVars.Iq_A as Iqs and Ids. Then below these lines, you can add DRV_writeDacData, by previously put gMotorVars.Id_A and gMotorVars.Iq_A as the inputs for this function.

    3. DAC-PWM1-4, not ADC1-4, are from PWM6A, 6B, 7A, 7B. But if I am not wrong, in the code for F28069M, it sets for 4A, 5A, 6A, and 6B.

    Best regards,

    Maria

  • Dear, ChrisClearman And Maria Todorova  

    Thank you for your reply, I think according to your answer, I go right. !!!

    one step in programme till now I can't write it! And it is how to write iqs as example to dacValue_1and as I understand the dacValue_1has been written to adc1 in j14.!

    how to write iqs as example to dacValue_1?

    thanks

  • Hello,

    I am not sure about the syntax (maybe somebody can correct me if I am wrong), but it is something like these lines:

        DRV_DacData_t *pDacData; // declaration
         // read Id and Iq vectors in amps
         gMotorVars.Id_A = _IQmpy(CTRL_getId_in_pu(handle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
         gMotorVars.Iq_A = _IQmpy(CTRL_getIq_in_pu(handle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
      // put Id and Iq
        pDacData->value[0] = gMotorVars.Id_A;
        pDacData->value[1] = gMotorVars.Iq_A;
    // call the function
        DRV_writeDacData(drvHandle,pDacData);

    Best regards,

    Maria

  • Hi there,

    I have a similar problem, I have exactly as described the code.

    It only comes a signal to PWMDAC2 and not a signal to PWMDAC1, PWMDAC3, PWMDAC4.

    I use TMDSHVMTRINSPIN TMS320F28069M Lab 12 – Using InstaSPIN-MOTION with Sensored Systems.

    How can it be?

    Regards

    Markus