Other Parts Discussed in Thread: MOTORWARE
Tool/software: Code Composer Studio
We are making progress on the flux error in lab2a and have also been working on lab1b. I just discovered that there is an inconsistency in IQ math mixing IQ24 and IQ that we do not understand. We are apply 29 volts to the Vdc Bus and expect the calculations in the motorware to realize that value but that is impossible because the preprocessor calculated USER_VOLTAGE_SF in user.h isn't allowed to go below 0.1. There are other values like resistance which are not correct yet either but we are working through all the values. In Hal.c HAL_setParams(), it converts the user voltage_sf to IQ24 because of the following in IQMathLib.h:
#ifndef GLOBAL_Q
#define GLOBAL_Q 24
#endif
In Hal.c HAL_setParams():
value = (_iq)ADC_readResult(obj->adcHandle,ADC_ResultNumber_7); // divide by 2^numAdcBits = 2^12
value = _IQ12mpy(value,voltage_sf);
pAdcData->dcBus = value;
{
USER_setErrorCode(pUserParams, USER_ErrorCode_voltage_sf_Low);
}