Skip to content

Conversation

@Switchleg1
Copy link

Description

/**

  • Adds canned drilling cycle G Codes:
  • G73: Shallow peck drill cycle
  • G80: Cancel drill cycle
  • G81: Basic drill cycle
  • G82: Normal drill cycle (Basic with dwell)
  • G83: Deep drill cycle (Normal with peck)
  • G98: Start drill - retract to initial
  • G99: Start drill - retract to specified
  • or when DRILL_USE_81_ONLY is specified:
  • G81.4: Shallow peck drill cycle
  • G81.0: Cancel drill cycle
  • G81.1: Basic drill cycle
  • G81.2: Normal drill cycle (Basic with dwell)
  • G81.3: Deep drill cycle (Normal with peck)
  • G81.18: Start drill - retract to initial
  • G81.19: Start drill - retract to specified
    */

Benefits

This can be used with CAM software to perform drilling operations.

Configurations

#define DRILL_CYCLES
#if ENABLED(DRILL_CYCLES)
//#define DRILL_USE_81_ONLY //Uses G81.x sub commands
#define DRILL_CYCLES_XY_FEEDRATE 1600 //Feedrate for xy operations
#define DRILL_CYCLES_RETRACT_FEEDRATE 1200 //Feedrate while retracting
#define DRILL_CYCLES_DEFAULT_FEEDRATE 300 //Default drilling freedrate if one is not specified
#define DRILL_CYCLES_DEFAULT_PECK 2.0 //Default pecking distance if one is not specified
#define DRILL_CYCLES_DEFAULT_DWELL 0 //Default dwell distance if one is not specified
#endif

@thisiskeithb
Copy link
Member

thisiskeithb commented Dec 20, 2025

Instead of feeding gcode commands we are now using the destination variable along with prepare_line_to_destination() to complete the move.
@Switchleg1
Copy link
Author

Related PR:

Related issue:

Lol, oh well it wasn't in the current release and I needed the functionality today

@ellensp
Copy link
Contributor

ellensp commented Dec 20, 2025

#define DRILL_CYCLES should be disabled by default In Configuration_adv.h

we now check the planner to see if its currently clearing the buffer from a M410 (quick stop) call, if so we quit the function.

this allows for the FREEZE switch to stop the machine smoothly followed by a M410 to clear the buffer allowing us to continue machining without having to dial in our part again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants