Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start the milling operation by setting the spindle speed.
CNC Programming
M03 S[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using M05 which stops the spindle instead of setting speed.
Using G01 which is a movement command, not spindle speed.
Using X100 which is a position, not speed.
✗ Incorrect
The spindle speed is set with 'S' followed by the speed value, like 1200 RPM.
2fill in blank
mediumComplete the code to move the milling tool to the starting position on the X axis.
CNC Programming
G01 X[1] F100 Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting Y50 which is a different axis.
Using F200 which is feed rate, not position.
Using G00 which is a command, not a position value.
✗ Incorrect
The X coordinate value should be a number like 50 to move the tool to X=50.
3fill in blank
hardFix the error in the code to correctly stop the spindle after milling.
CNC Programming
M[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using M03 which starts the spindle instead of stopping.
Using M04 which starts spindle counterclockwise.
Using M01 which is optional stop, not spindle stop.
✗ Incorrect
M05 is the correct command to stop the spindle in CNC programming.
4fill in blank
hardFill both blanks to create a loop that mills multiple passes at different depths.
CNC Programming
for depth in range(0, [1], [2]): print(f"G01 Z-{depth}")
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a step size larger than max depth.
Using a max depth smaller than step size.
Confusing the order of max depth and step size.
✗ Incorrect
The loop goes from 0 to 20 in steps of 5 to mill at depths 0, 5, 10, 15.
5fill in blank
hardFill all three blanks to create a dictionary mapping tool names to their speeds.
CNC Programming
tools = {"[1]": [2], "[3]": 1500} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using variable names instead of strings for keys.
Using feed_rate as a key instead of a tool name.
Mixing up keys and values.
✗ Incorrect
The dictionary maps 'endmill' to 1200 (speed) and 'drill' to 1500 (speed).
