Part Number: TMS320F28069M
Other Parts Discussed in Thread: CONTROLSUITE, TMDSHVMTRINSPIN, MOTORWARE
Hello.
I'm trying to run proj_lab01b on custom hardware with tms320f28069m. Actually I'm using LaunchPadXL with TMS320F28069M. I've loaded an example for hvkit_rev1p1.
I've configured USER_MOTOR == Dayton_2N865T, also I've have to add (because of errors in compilation)
#define USER_MOTOR_FREQ_LOW (5.0) // Hz - suggested to set to 10% of rated motor frequency
#define USER_MOTOR_FREQ_HIGH (50.0) // Hz - suggested to set to 100% of rated motor frequency
#define USER_MOTOR_FREQ_MAX (60.0) // Hz - suggested to set to 120% of rated motor frequency
#define USER_MOTOR_VOLT_MIN (40.0) // Volt - suggested to set to ~20% of rated motor voltage
#define USER_MOTOR_VOLT_MAX (220.0) // Volt - suggested to set to 100% of rated motor voltage
gDacData.ptrData[0] = &angle_gen.Angle_pu;
gDacData.ptrData[1] = &gPwmData.Tabc.value[0];
gDacData.ptrData[2] = &gAdcData.I.value[0];
gDacData.ptrData[3] = &gAdcData.V.value[0];
pDacData->offset[0] = _IQ(0.0);
pDacData->offset[1] = _IQ(0.5);
pDacData->offset[2] = _IQ(0.5);
pDacData->offset[3] = _IQ(0.5);
pDacData->gain[0] = _IQ(1.0);
pDacData->gain[1] = _IQ(1.0);
pDacData->gain[2] = _IQ(1.0);
pDacData->gain[3] = _IQ(1.0);
The problem when I'm running this project, I get this:
CH1 - Angle_pu CH2 - Tabc.value[0]

Is this correct?
I've tried to run proj_lab01b for another board - drv8312kit_revD. It needed some changes to run with parameters for ACIM motor, and then I can see a normal graph for angle
CH1 - Angle_pu CH2 - Tabc.value[0]

Can you tell me what is wrong?
Also i've fount differences in HAL_writeDacData function for this projects. Here is for hvkit_rev1p1
static inline void HAL_writeDacData(HAL_Handle handle,HAL_DacData_t *pDacData)
{
HAL_Obj *obj = (HAL_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 HAL_writeDacData() function
and here is for drv8312kit_revD
static inline void HAL_writeDacData(HAL_Handle handle,HAL_DacData_t *pDacData)
{
HAL_Obj *obj = (HAL_Obj *)handle;
// convert values from _IQ to _IQ15
uint_least8_t cnt;
_iq period;
_iq dacData_sat_dc;
_iq value;
uint16_t cmpValue[4];
period = (_iq)pDacData->PeriodMax;
for(cnt=0;cnt<4;cnt++)
{
dacData_sat_dc = _IQmpy(pDacData->value[cnt], pDacData->gain[cnt]) + pDacData->offset[cnt];
value = _IQmpy(dacData_sat_dc, period);
cmpValue[cnt] = (uint16_t)_IQsat(value, period, 0);
}
// write the DAC data
if(obj->pwmDacHandle[PWMDAC_Number_1])
{
PWMDAC_write_CmpA(obj->pwmDacHandle[PWMDAC_Number_1], cmpValue[0]);
PWMDAC_write_CmpB(obj->pwmDacHandle[PWMDAC_Number_1], cmpValue[1]);
}
if(obj->pwmDacHandle[PWMDAC_Number_2])
{
PWMDAC_write_CmpA(obj->pwmDacHandle[PWMDAC_Number_2], cmpValue[2]);
PWMDAC_write_CmpB(obj->pwmDacHandle[PWMDAC_Number_2], cmpValue[3]);
}
return;
} // end of HAL_writeDacData() function


