Skip to content

Excellon parser: missing G-code and M-code support #297

@rampageservices

Description

@rampageservices

Summary

The Excellon drill parser (src/drill.c) defines many G-codes and M-codes in its enums (drill_g_code_t, drill_m_code_t) but only handles a subset. Commands that are parsed but not handled fall through to "unsupported" error messages, and commands not even parsed are silently ignored or reported as unknown.

This issue tracks the gap between what the parser defines and what it actually handles, prioritized by real-world impact.

G-codes

Handled

Code Name Notes
G00 Rout mode / rapid positioning Route mode state
G01 Linear routing move Route mode state (added in #283)
G02 Circular CW arc routing Merged in #298 (I/J offsets), pending #345 (A radius)
G03 Circular CCW arc routing Merged in #298 (I/J offsets), pending #345 (A radius)
G05 Drill mode Default mode
G32 Routed circle CW canned cycle Pending #305
G33 Routed circle CCW canned cycle Pending #305
G85 Canned slot (drilled) Parses end coords
G87 Routed slot canned cycle Pending #300
G90 Absolute mode Coordinate mode
G91 Incremental mode Coordinate mode
G93 Zero set Origin offset

Handled (ignored — machine-only, no visual effect)

Code Name Notes
G07 Override tool feed/speed Pending #306
G34-G39 Vision system commands Pending #306
G40-G42 Cutter compensation Pending #306
G45-G48 Vision offset relative Pending #306
G81-G84 Package canned cycles (DIP, etc.) Pending #306

M-codes

Handled

Code Name Notes
M00 End of program
M01 Pattern end Pending #304 (currently stats-only)
M02 Repeat pattern offset Pending #304
M14 Z-axis route position (depth ctrl)
M15 Z-axis route position (tool down)
M16 Retract with clamping (tool up)
M17 Retract without clamping (tool up)
M18 Tool tip check
M25 Pattern start Pending #304 (currently stats-only)
M30 End + rewind
M45 Long message
M47 Message
M48 Header start
M70 Swap axis Pending #301
M71 Metric
M72 Imperial
M80 Mirror X Pending #301
M90 Mirror Y Pending #301
M95 Header end
M97/M98 Canned text X/Y

Handled (ignored — machine-only, no visual effect)

Code Name Notes
M06 Optional stop Pending #306
M08 Step and repeat end Pending #306
M09 Stop for inspection Pending #306
M50-M52 Visual step and repeat Pending #306
M60-M61 Reference scaling Pending #306
M62-M63 Peck drilling Pending #306

Defined but NOT handled

Code Name Impact
M99 User defined pattern Low

Progress

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions