Challenge - 5 Problems
Pattern Drilling Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediateOutput of a simple drilling loop
What is the output of this CNC drilling loop code snippet?
CNC Programming
FOR I = 1 TO 3 G81 X=I*10 Y0 Z-5 R1 F100 ENDFOR
Attempts:
2 left
💡 Hint
Look at how the X coordinate changes with the loop variable I.
✗ Incorrect
The loop runs from 1 to 3, multiplying I by 10 for the X coordinate, so holes are drilled at X=10, 20, and 30 on Y=0.
📝 Syntax
intermediateIdentify the syntax error in drilling loop
Which option contains the syntax error in this CNC drilling loop?
CNC Programming
FOR I = 1 TO 4 G81 X=I*15 Y0 Z-6 R1 F120 ENDFOR
Attempts:
2 left
💡 Hint
Check how expressions are written in CNC loop commands.
✗ Incorrect
Parentheses are not used for expressions in this CNC syntax; using them causes a syntax error.
🚀 Application
advancedCreate a rectangular drilling pattern
You want to drill a 3x2 grid of holes spaced 20mm apart starting at X=0, Y=0. Which code snippet correctly uses loops to do this?
Attempts:
2 left
💡 Hint
Remember the grid size and spacing, and how loop counters multiply spacing.
✗ Incorrect
Option B correctly loops I from 0 to 2 (3 holes) and J from 0 to 1 (2 holes), multiplying by 20mm spacing.
🔧 Debug
advancedWhy does this drilling pattern miss the last hole?
This code is supposed to drill 4 holes spaced 10mm apart on X axis, but only drills 3. Why?
CNC Programming
FOR I = 1 TO 3 G81 X=I*10 Y=0 Z-5 R1 F100 ENDFOR
Attempts:
2 left
💡 Hint
Check the loop range carefully.
✗ Incorrect
The loop runs from 1 to 3, so it drills only 3 holes. To drill 4 holes, loop should go to 4.
🧠 Conceptual
expertCalculate total holes drilled in complex pattern
Given this nested loop drilling pattern, how many holes are drilled in total?
FOR I = 0 TO 2
FOR J = 0 TO 3
G81 X=I*15 Y=J*10 Z-5 R1 F100
ENDFOR
ENDFOR
Attempts:
2 left
💡 Hint
Multiply the number of iterations of both loops.
✗ Incorrect
Outer loop runs 3 times (0,1,2), inner loop runs 4 times (0 to 3), total holes = 3*4=12.
