machinekit-cnc
machinekit-cnc copied to clipboard
G64 Strange Behavior
Issue by dkhughes
Tue Mar 27 23:07:03 2018
Originally opened as https://github.com/machinekit/machinekit/issues/1363
Hello,
I guess the trajectory planner was modified a little time ago? I'm seeing some very strange behavior with path blending and emcAbort.
I've attached the program showing the problem.
Dragon170928-11_toolpath1_Machine Relief 1_End Mill 1_4 Inch Roughing.txt
The units are in inches. If you set blending to 0.001" via G64 P0.001, then issue a stop command (emcTrajAbort), the machine moves to a different position instead of stopping. For my config, this position is actually into the part (it moves -X, -Y, -Z in a three axis Cartesian config). For settings of G64 P0.003 or greater, the interp immediately stops when the command is received.
Anyone else noticing odd behavior? Or could someone see if they can duplicate the issue?
Thanks, Devin
Comment by dkhughes
Thu Mar 29 23:51:47 2018
More info: it seems the move is to a position ahead in the program. Perhaps to the position of the readahead line. There is a line in the code about a kludge to avoid motion on an abort that mentions a race condition - perhaps I'm seeing this race?
// abort everything
// KLUDGE call motion abort before state restore to make absolutely sure no
// stray restore commands make it down to motion
emcMotionAbort();
// Then call state restore to update the interpreter
emcTaskStateRestore();
emcTaskAbort();
From Here: https://github.com/machinekit/machinekit/blob/master/src/emc/task/emctaskmain.cc#L2078