Challenge - 5 Problems
G-code Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this G-code program snippet?
Consider this G-code snippet for a CNC milling machine:
What is the position of the tool after line N40 executes?
N10 G21
N20 G90
N30 G00 X10 Y10
N40 G01 X20 Y20 F100
What is the position of the tool after line N40 executes?
CNC Programming
N10 G21 N20 G90 N30 G00 X10 Y10 N40 G01 X20 Y20 F100
Attempts:
2 left
💡 Hint
G90 sets absolute positioning, G00 and G01 move the tool to specified coordinates.
✗ Incorrect
G90 means absolute positioning, so coordinates are from the origin. Line N40 moves the tool to X20 Y20 at feed rate 100.
🧠 Conceptual
intermediate1:30remaining
Which line defines the program start in a typical G-code file?
In a standard G-code program, which line usually marks the start of the main machining commands?
Attempts:
2 left
💡 Hint
Look for the first movement command after setup.
✗ Incorrect
G00 (rapid move) or G01 (linear feed move) lines after setup commands start the actual machining.
🔧 Debug
advanced2:00remaining
Identify the error in this G-code snippet
This G-code snippet is intended to move the tool to X50 Y50 and then start cutting:
What is the problem with this program?
N10 G90 N20 G01 X50 Y50 F200 N30 G00 X0 Y0 N40 M30
What is the problem with this program?
CNC Programming
N10 G90 N20 G01 X50 Y50 F200 N30 G00 X0 Y0 N40 M30
Attempts:
2 left
💡 Hint
Check if the spindle is turned on before cutting moves.
✗ Incorrect
Without spindle start (M03 or M04), the tool won't cut even if it moves at feed rate.
🚀 Application
advanced1:30remaining
How many lines are in this G-code program excluding comments?
Count the number of executable lines in this G-code program (ignore lines starting with ';' which are comments):
; Program start N5 G21 N10 G90 ; Move to start N15 G00 X0 Y0 N20 G01 X10 Y10 F150 N25 M05 N30 M30
CNC Programming
; Program start N5 G21 N10 G90 ; Move to start N15 G00 X0 Y0 N20 G01 X10 Y10 F150 N25 M05 N30 M30
Attempts:
2 left
💡 Hint
Count only lines that do not start with ';'.
✗ Incorrect
There are 8 lines total, 2 are comments, so 6 executable lines remain.
🧠 Conceptual
expert1:00remaining
What is the effect of the M30 command in a G-code program?
In a CNC program, what does the M30 command do when executed?
Attempts:
2 left
💡 Hint
Think about program end and reset commands.
✗ Incorrect
M30 stops the program, stops spindle and coolant, and rewinds program to start for next run.
