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.
Hi,
I'm debugging some weird behavior, I have my own software project based on all the labs, While the motor is stopped it can switch between Spintac velocity, Spintac position, and just torque control. And when in velocity and torque mode It can select between sensorless and encoder. This same code base also switches between the BOOSTXL DRV8305 + 28069M dev kit and my custom board based on the DRV8305 + 28054M.
I've got Spintac position working in all cases using the encoder, on the 54M and the 69M micros, works mint so far.
With spintac velocity I can only get the 69M working with the encoder angle, using the 54M is run's for about ~2.5 roll overs in position and then cuts out and Iq gets ramped up like crazy and it faults on current limit.
If I set the velocity target to a lower speed it stays operating longer but it's roughly 2.5 rollovers on the encoder position when it happens
Using spintac velocity and the FOC sensorless angle input it works on both the 69M and the 54M.
Torque control is the same, using the encoder doesn't work on the 54M
I've searched thru a lot of the encoder stuff and can't find a difference between the 54M and the 69M code.
The only clear difference I can see is that the CTRL structure on the 69M is v1p6 and the 54M is v1p7. Could this explain what's happening?
I've also got the 54M running with "FLASH" defined, and the 69M running without it defined.
Any tips on where to look for overflow? or a way to clear it to see if it fixes the issue?
Cheers,
Alan
Alan,
What is the value you have set for ST_MREV_ROLLOVER?
If you use lab 12b with the 054M do you see the same issue?
ST_MREV_ROLLOVER is unchanged at 10
lab12b and the 54m have the same issue. I haven't put just lab12b on the 69M in awhile, I will try this tomorrow just to confirm this is still working
I've flipped 2 phases on the motor and I've flipped the encoder A & B, but they all instantly stall the motor rather than keep going.
The 54M runs at 60Mhz while the 69M is at 90Mhz
Alan,
I just ran lab 12b using a 54M on the DRV8312 board. I don't see any issues similar to what you describe.
I imagine there is some subtle code issue that is causing this issue. Nothing inside of the SpinTAC code would have an issue at 2.5 mech revolutions.
Alright I've had some progress, I've turned the spintac current limits down so it doesn't go overcurrent and I let the thing run.
On startup with spintac velocity and encoder it starts and runs at speed ref until the posistion count gets to 13 roll overs, or ~130turns and stops, with a holding current on the motor. If i manually rotate the motor forward or backwards to the next rollover point's (+/10 turns) and even 40 turns further. When i release the shaft it rotaes its way back to that 13 roll over point, 130 turns !
So it's somehow doing position control still !
I'm guessing I haven't turned off the position control properly when i switch to velocity?
I have both definitions defined and I switch between them like this
static ST_Obj st_obj;
static ST_Handle gstPosHandle = NULL;
static ST_VelObj st_Velobj;
static ST_VelHandle gstVelHandle = NULL;
to change from position to vel i do this with the motor stopped
if(gstPosHandle != NULL) //If position is currently running, disable it
{
STPOSCTL_setEnable(gstPosHandle->posCtlHandle, false);
gstPosHandle = NULL;
}
gstVelHandle = ST_Velinit(&st_Velobj, sizeof(st_Velobj)); // velocity
ST_setupVelCtl(gstVelHandle); // Setup the SpinTAC Components
// and the other way I do this
if(gstVelHandle != NULL) //If velocity is currently running, disable it
{
STVELCTL_setEnable(gstVelHandle->velCtlHandle, false);
gstVelHandle = NULL;
}
// Initialise the SpinTAC Components
gstPosHandle = ST_init(&st_obj, sizeof(st_obj)); // position
ST_setupPosCtl(gstPosHandle);
the encoder init doesn't change from this declared in main, and ive taken it out of both the pos and vel objects
// init the ST PosConv object, encoder module
posConvHandle = STPOSCONV_init(&conv, sizeof(conv));
ST_setupPosConv(posConvHandle);
I went all the way back to lab12b on a brand new motorware install, BOOST DRV8305 + 69m devboard and noted the same behavior, doing "position control " instead of velocity . And now my codebase doesn't work with spintac vel + encoder on the 69M either.
I bricked my dev kit as well by accidentally flashing the 54m code onto the 69M :(
Sooo even more confused.... I came on to write more questions and explained that it could be the new version of CCS or the motor which I haven't changed.
And sure enough I check my motor and under the housing the flexi coupling for the encoder is loose on the shaft. Problem solved !
So it must have slipped on the shaft, the equivalent to loosing steps I imagine? What a weird effect it had tho!