Other Parts Discussed in Thread: TMS320F28069, , C2000WARE, CONTROLSUITE
Hello,
We use the TMS320F28069 processor with Instaspin for an inverter application. I am looking into a little bit into the code trying to understand some parts of it to rewrite it and add some functionality for our application and I have some questions about it:
1. CTRL_setup: As far as I understand all this function does is runs the trajectories, is this correct? If so, which trajectories? I believe it is speed, Id, maybe speed_max?
I added to this function another trajectory for the Iq so that the torque would be ramped up instead of stepped-up:
" // Iq trajectory handle
_iq intValue_Iq = TRAJ_getIntValue(obj->trajHandle_Iq);
_iq targetValue_Iq = TRAJ_getTargetValue(obj->trajHandle_Iq);
_iq maxDelta_Iq = TRAJ_getMaxDelta(obj->trajHandle_Iq);
_iq error_Iq = targetValue_Iq - intValue_Iq;
// clip and update the value
intValue_Iq += _IQsat(error_Iq,maxDelta_Iq,-maxDelta_Iq);
// store the value
TRAJ_setIntValue(obj->trajHandle_Iq,intValue_Iq);
CTRL_setIq_ref_pu(handle, intValue_Iq); "
would it be possible to just re-use that code for the other trajectories instead of using CTRL_runTraj? I believe that function is part of the Instaspin ROM library and thus I have no access to it.
2. What is the spdmax trajectory? Is this a trajectory for the maximum speed that the speed controller can output? Is this not the same as changing the maxValue of the speed trajectory? Why do you need another trajectory?
3. What is gMxCurrentSlope? In my code now it is:
"if(EST_isMotorIdentified(obj->estHandle))
{
stuff;
EST_setMaxCurrentSlope_pu(obj->estHandle,gMaxCurrentSlope);
stuff;
}
else
{
gMaxCurrentSlope = EST_getMaxCurrentSlope_pu(obj->estHandle);
} "
Is this only used during identification? if so, what identification? The only identification that I need to use in my application is the offsets calibration and the Rs recalibration.
4. Is it possible to know what parameters are necessary for the estimator to run? The only place where I have found anything to do with the setup of the estimator is in CTRL_setparam:
"CTRL_setEstParams(obj->estHandle,pUserParams); "
I am assuming the estimator takes all of the parameters it needs from pUserParams? I was planning on modifying this structure to maybe add/remove some stuff. Is this possible without breaking the estimator?
5. I would like to add another interrupt to deal with CAN communications. Would this somehow interfere with the main ISR? Is there any example for this?
6. The structure gMotorVars is defined as volatile. Is this necessary? Can be changed?
Thanks in advance!
Javier