Hello,
I'd like to implement field weakening using my TMS320F28069M piccolo motor controller together with my SpinTac controller. I found the example in lab9, but this only shows an example using the FOC controller. Is it possible to implement field weakening with SpinTac, e.g. modify the mainISR function in lab 5f to include a call to FW_run, such as the code section below (assuming that everything is initialized properly).
Also, would this approach work together with sensored commutation from an analog encoder, e.g. lab12b?
Thanks for your support.
Best regards,
Chris
if(FW_getFlag_enableFw(fwHandle) == true)
{
FW_incCounter(fwHandle);
if(FW_getCounter(fwHandle) > FW_getNumIsrTicksPerFwTick(fwHandle))
{
_iq refValue;
_iq fbackValue;
_iq output;
FW_clearCounter(fwHandle);
refValue = gMotorVars.VsRef;
fbackValue = gMotorVars.Vs;
FW_run(fwHandle, refValue, fbackValue, &output);
CTRL_setId_ref_pu(ctrlHandle, output);
gMotorVars.IdRef_A = _IQmpy(CTRL_getId_ref_pu(ctrlHandle), _IQ(USER_IQ_FULL_SCALE_CURRENT_A));
}
}
else
{
CTRL_setId_ref_pu(ctrlHandle, _IQmpy(gMotorVars.IdRef_A, _IQ(1.0/USER_IQ_FULL_SCALE_CURRENT_A)));
}