diff --git a/docs/src/gcode/g-code.adoc b/docs/src/gcode/g-code.adoc index 7354804b640..bdedb8a26a3 100644 --- a/docs/src/gcode/g-code.adoc +++ b/docs/src/gcode/g-code.adoc @@ -1757,7 +1757,7 @@ It is an error if: [source,{ngc}] ---- -G73 X- Y- Z- R- Q- +G73 X- Y- Z- R- Q- P- ---- * 'R' - retract position along the Z axis. @@ -1766,7 +1766,7 @@ G73 X- Y- Z- R- Q- The 'G73' cycle is drilling or milling with chip breaking. This cycle takes a Q number which represents a 'delta' increment along -the Z axis. +the Z axis. Peck clearance can be specified by optional P number. * Preliminary motion. ** If the current Z position is below the R position, The Z axis does @@ -2371,7 +2371,7 @@ seconds at the bottom of the hole. [source,{ngc}] ---- -G83 (X- Y- Z-) or (U- V- W-) R- L- Q- +G83 (X- Y- Z-) or (U- V- W-) R- L- Q- P- ---- The 'G83' cycle (often called peck drilling) is intended for deep @@ -2381,7 +2381,8 @@ drilling in aluminum). This cycle takes a Q number which represents a 'delta' increment along the Z-axis. The retract before final depth will always be to the 'retract' plane even if G98 is in effect. The final retract will honor the G98/99 in effect. G83 functions the same as G81 -with the addition of retracts during the drilling operation. +with the addition of retracts during the drilling operation. Peck clearance +can be specified by optional P number. * Preliminary motion, as described in the <> section. diff --git a/src/emc/rs274ngc/interp_cycles.cc b/src/emc/rs274ngc/interp_cycles.cc index 363a5337c6d..064ed1301b1 100644 --- a/src/emc/rs274ngc/interp_cycles.cc +++ b/src/emc/rs274ngc/interp_cycles.cc @@ -154,7 +154,7 @@ int Interp::convert_cycle_g83(block_pointer block, Thanks to Billy Singleton for pointing it out... */ CHKS((delta <= 0.0), NCE_NEGATIVE_OR_ZERO_Q_VALUE_USED); - rapid_delta = _setup.parameter_g83_peck_clearance;; + rapid_delta = block->p_flag?block->p_number:_setup.parameter_g83_peck_clearance; for (current_depth = (r - delta); current_depth > bottom_z; current_depth = (current_depth - delta)) { @@ -215,7 +215,7 @@ int Interp::convert_cycle_g73(block_pointer block, Thanks to Billy Singleton for pointing it out... */ CHKS((delta <= 0.0), NCE_NEGATIVE_OR_ZERO_Q_VALUE_USED); - rapid_delta = _setup.parameter_g73_peck_clearance; + rapid_delta = block->p_flag?block->p_number:_setup.parameter_g73_peck_clearance; for (current_depth = (r - delta); current_depth > bottom_z; current_depth = (current_depth - delta)) {