-
Notifications
You must be signed in to change notification settings - Fork 41
Description
When attempting to make near-diagonal pen movements, the pen fails to move, though the API gives no indication of the failure. I'm observing this in cncserver version 2.9.1, operating an AxiDraw V3, running EBB firmware 2.8.1.
The easiest way to observe this with the AxiDraw V3 is, with the pen in the home position, is to PUT {x: 50, y: 68.8} (equivalent to 6000 x steps and 5999 y steps) to the /pen endpoint. The pen will fail to move, but the API will return success. Additionally, cncserver will think the pen has moved, making it easy to try to move the pen beyond the physical limits of the machine on subsequent movements. The only indication of an error will be !0 Err: <axis2> step rate < 1.31Hz. outputted to the console.
Similarly, if the pen is at {x: 100, y: 0}, attempting to move to {x: 50, y: 68.8} will fail with !0 Err: <axis1> step rate < 1.31Hz. outputted to the console.
I think I understand why this is happening, and it kinda makes sense. (Have I got it right that each motor moves the pen on orthogonal diagonal axes, rather than xy axes?). But it would be better if the API either returns an error in these cases (either detecting ahead of time that the movement would fail, or checking for this message from the firmware). Or splits the movement into multiple move commands that avoid this issue.
I'll need to implement the latter for my current project, whether that's inside or outside cncserver, so any thoughts on how to approach this would be appreciated.