Skip to content

Commit

Permalink
add optional p word for peck clearance to G73 and G83
Browse files Browse the repository at this point in the history
  • Loading branch information
rene-dev committed Jun 18, 2023
1 parent 3b6f309 commit ae93104
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions docs/src/gcode/g-code.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,7 @@ It is an error if:

[source,{ngc}]
----
G73 X- Y- Z- R- Q- <L->
G73 X- Y- Z- R- Q- P- <L->
----

* 'R' - retract position along the Z axis.
Expand All @@ -1766,7 +1766,7 @@ G73 X- Y- Z- R- Q- <L->

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
Expand Down Expand Up @@ -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
Expand All @@ -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
<<gcode:preliminary-motion,Preliminary and In-Between Motion>> section.
Expand Down
4 changes: 2 additions & 2 deletions src/emc/rs274ngc/interp_cycles.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit ae93104

Please sign in to comment.