synthetos / g2

g2core - The Next Generation
Other
622 stars 296 forks source link

edge-preview: missing acceleration/deceleration when sending multiple moves at once #487

Open prof7bit opened 3 years ago

prof7bit commented 3 years ago

I was just playing around with the edge-preview branch (to check whether my other bug was fixed there [it is not]) and found the following odd behavior:

If I send something like this:

g1 z100 f10000 g1 z0 f10000 g1 z100 f10000 g1 z0 f10000 g1 z100 f10000 g1 z0 f10000 g1 z100 f10000 g1 z0 f10000

Then it will not decelerate/accelerate between the direction reversals, it will just hard switch direction at full speed, resulting in severe mechanical stress and and my colleague coming into the room saying: "Wow, the machine might be destroyed before the software is finished"!

The edge branch does not have this bug.

I probably won't be available to test the fix on the preview branch (should it ever be fixed at all) because I am now moving back to the half finished edge branch which does not have this error. But I wanted to report it anyways, so it can be worked on in case this project ever becomes actively developed again.

giseburt commented 3 years ago

This indicates that your jt (JUNCTION_INTEGRATION_TIME in settings) value is too high. It basically tells the system how aggressive of cornering your machine can handle.

The test you have is great, except you likely want to have the same test for X and Y and combined XY as well. I'd start with setting jt to something low, like 0.5, and raising it slowly until that axis stalls. Verify that value is good for the other axes.

Note that jt works with your axis jerk settings (xjm, or X_JERK_MAX, and yjm, etc.), so if one axis is having trouble with the jt that the other axis are fine with, then lower that axis' jerk max setting.

-Rob