Arc error-checking update.
- Updated offset-mode arc error-checking to EMC2’s version: The old NIST definition required the radii to the current location and target location to differ no more than 0.002mm. This proved to be problematic and probably why LinuxCNC(EMC2) updated it to be 0.005mm AND 0.1% radius OR 0.5mm.
This commit is contained in:
parent
8ed8005f6c
commit
79e0e45826
2 changed files with 7 additions and 3 deletions
8
gcode.c
8
gcode.c
|
|
@ -742,8 +742,12 @@ uint8_t gc_execute_line(char *line)
|
|||
y -= gc_block.values.ijk[axis_1]; // Delta y between circle center and target
|
||||
float target_r = hypot_f(x,y);
|
||||
gc_block.values.r = hypot_f(gc_block.values.ijk[axis_0], gc_block.values.ijk[axis_1]); // Compute arc radius for mc_arc
|
||||
|
||||
if (fabs(target_r-gc_block.values.r) > 0.002) { FAIL(STATUS_GCODE_INVALID_TARGET); } // [Arc definition error]
|
||||
|
||||
target_r = fabs(target_r-gc_block.values.r);
|
||||
if (target_r > 0.005) {
|
||||
if (target_r > 0.5) { FAIL(STATUS_GCODE_INVALID_TARGET); } // [Arc definition error]
|
||||
if (target_r > 0.001*gc_block.values.r) { FAIL(STATUS_GCODE_INVALID_TARGET); } // [Arc definition error]
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MOTION_MODE_PROBE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue