As you can see, the software sends a initial positioning command, waits for 1 second and starts to send positions every 50ms.
ODrive sets the motor to the initial position and after getting some of the commands, it stops responding.
hex(odrive0.axis0.error) shows nothing, the software hangs.
If you want to test this, use HTerm, it’s a pretty terminal programm for serial connections.
Make a file with just one command like: p 0 32000 0 0 (+CR)
In Hterm you can send this file coninuously.
I know, that block shouldn’t be used, without sending a “w”. But that’s what I found. After remarking it, I was able to send thousands of commands with a distance of 10ms. I’m not really confirm in programming ST32, maybe somebody can tell me why that happens. Maybe the If else is to long and the serial receive interrupt fires before the routine is finished.
I think I may have the same problem as you do (explained here).
So I was wondering what you mean by “remarking” the block of code ? Did you suppress the “else if” so that this block is always called even when you don’t send “w”?
So I guess that if this is what you do, it means that you can only write property, but you can’t read anymore.
Is this problem still present? I’ve started to word on the program of my simulator. If the problem is still present, do I have do download the end stop branch, after that comment out the problem you mentioned and after that compile it and load it to the ODrives?
With the endstop branch you can do a initial find zero run. After that, the actuators stops at position 0. Now my game-engine startup output sets the actuator to it’s middle position. In my case 262143.
Now Simtools send a position command every 20ms.
Stopping the game, sets the position of the actuators to middle position again.
I’m still having trouble with serial ASCII commands. I’m using Simtools to send commands to the odrive. This works for a while, but suddenly the motors stop moving. I was able to reach the odrive through odrivetool and was also running a plot. Both showed no errors. odrv0.axis0.error was also 0x0000. I could still control the odrive with pos_setpoint. COM3 was still available in PuTTY, but the odrive didn’t respond to serial commands anymore.
Is there a way to debug the serial protocol? The serial buffer for example? I don’t see any relevant properties I could watch in odrivetool.
EDIT: After unplugging and reconnecting the usb cable, the serial connection worked again.
Still looking for the problem and solution…