Introduction
Writing notes inside a CNC program helps you and others understand what the program does. It makes fixing and changing the program easier.
Jump into concepts and practice - no test required
Writing notes inside a CNC program helps you and others understand what the program does. It makes fixing and changing the program easier.
(In most CNC languages, comments are written using parentheses or semicolons) ( This is a comment ) ; This is also a comment
(Start of program - drilling holes)
; Tool change to drill bit
(Move to X10 Y20 Z5 - safe position)
This program drills three holes in a row. Comments explain each step so anyone reading the program knows what is happening.
(Program to drill 3 holes)
G21 (Set units to millimeters)
G90 (Use absolute positioning)
(Tool change to drill bit)
T1 M06
(Drill first hole at X10 Y10)
G00 X10 Y10 Z5 (Move above hole)
G01 Z-5 F100 (Drill down)
G00 Z5 (Retract)
(Drill second hole at X20 Y10)
G00 X20 Y10 Z5
G01 Z-5 F100
G00 Z5
(Drill third hole at X30 Y10)
G00 X30 Y10 Z5
G01 Z-5 F100
G00 Z5
M30 (End of program)Always keep comments clear and short.
Update comments if you change the program.
Use comments to mark important sections or warnings.
Comments help explain CNC programs for easier understanding.
Use parentheses or semicolons to write comments.
Good documentation saves time and prevents mistakes.
G01 X10 Y10 ; Move to position (10,10) ; This is a comment line G02 X20 Y20 I5 J5 ; Circular interpolation
G01 X10 Y10 (Move to start position G02 X20 Y20 I5 J5) ; Circular interpolation