When I calibrate the motor all goes well with no errors, then I enter closed loop control, some times it has no stiffness and other times it holds position stiffly until i give it a setpoint then it only spins a little then stops and free wheels. Then in either state I read the errors I get the same errors;
In : hex(odrv0.axis0.error)
In : hex(odrv0.axis0.motor.error)
In : hex(odrv0.axis0.encoder.error)
When the motor is not stiff after entering closed loop the above error states are the same.
So looking up these errors I find;
ERROR_CONTROL_DEADLINE_MISSED = 0x0010
ERROR_CONTROLLER_FAILED = 0x200
Currently I am having the same problem as you do! Only I have got this error when asking for encoder.error: 0x010. I suppose you made a typo over there.
I certainly do not want to take over your thread, but my error occurs only on axis0. On axis1 spins a little as you described, but it will stay stationary without any errors. How about your motors?
I’ve only been testing axis0, as I only soldered a socket onto that channel, on this board, No encoder errors, my encoder is tracking well. Im using the encoder from the odrive store. I’ve read the encoder count and rotated the shaft 360 degrees and read it again, I get exactly what I expect. I’ll solder a socket on axis 1, I do remember axis 0 has some known bug with high current causing drv errors.
After setting back to factory defaults. Motor now calibrates and drives under velocity mode, but errors out if sudden changes are required. I’m sure it’s something like current spiking or voltage dipping, when I request a sudden movement with the position mode. Just thought the error message would indicate such, not just controller error? Today I’ll try adding a brake resister on, I’m using a 24v 40A power supply, but it might be dipping. I have not set the low voltage shutdown level, can’t remember the commands, it’s not in the tutes, I’ll need to search the forums or my notes, as it’s been at least 6 months since I used the Odrive last
I’m using an Odrive V 3.5, latest stable firmware, flashed yesterday, 48v version.
I’m using a meanwell 24v Dc 40A power supply.
No braking resister, no extra caps, just 8inch thick leads between power supply an Odrive.
I have not set the mini and max voltage protection values, maybe this is the cause of the error but I assumed there would be a more detailed error message if this was triggered?
Ill look up the commands to set the voltage limits. I did lower the max current limit, not sure if this limits the output, casing softer responce or errors out if the PID current loop exceeds this limit?
I have added the supplied 2R Resistor
checked the Vbus limits (low limit 8v upper 52V by default, so shouldn’t be hitting those with my 24V 40A supply. I’ve set motor current limit to 10A
Still same issue, motor calibrates but errors when I give it a set point, same errors as posted above
I have also noticed that when I calibrate the motor, then set to closed loop, it is some what stiff but if I force it to turn it goes into the error state, if I increase the motor current limit it does change the amount I need to turn it by to force the error. So either it is erroring because the tracking error is getting too high or the PID loop is saying to try harder to hold position and causes a current limit to be exceeded somewhere?
Am I right to assume.
Setting current limit, motor poles and encoder count, voltage limits and then
odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
Calibrates everything, though doesn’t tune PID.
Or do I manually need to calibrate encoder offset or something else?
Im following the getting started tut and have followed every step, I just error the drive out if i force the motor to turn, previously, 6 months ago, if the current limit was too low it wouldn’t error out, just wouldn’t be very stiff. Also errors out now if I tell it to drive to a position, basicaly only happy if stationary. What am I doing wrong?
Im using an out runner motor, 5060 size. low KV not exactly sure but basicaly a geared skateboard motor.
Today with help from madcow and Melon (sorry cant remeber exact name) through live chat, we also solved our issue. There is a controller error register that I was unaware of, from this we could see that the motor was exceeding the max velocity limit, apparently the max velocity limit, sets the maximum velocity but also sets a critical limit above this that is adjusted by a seperate variable that is an allowable margin, as a percentage, this way if there is overshoot, you can set how much is acceptable before erroring out, ours PID values are not fined tuned so it was overshooting the max velocity, by either increasing max velocity or better by increasing the allowable margin or even better tuning the PID controller we solved our issue.
So perhaps our issue are different or the older firmware happens to have different default settings?
@Ben_M hi, can you tell the variable name and the way to tune the pid of current controller. I can’t find it in the code or in the documentation. I have the same error in motor i.e, 0x10 ERROR_CONTROL_DEADLINE_MISSED. Can you please help me out.
There is nothing like OVERSPEED_ERROR anymore. The only error is in the motor 0x10 i.e, ERROR_CONTROL_DEADLINE_MISSED. I have tuned vel and pos gains and the setpoint reaches exactly at the same position. Now i don’t know what these variables (encoder bandwidth and vel limit tolerance means) can you tell me what they mean so i can adjust their values?