Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to reduce the number of rapid moves (G0) in the CNC program.
CNC Programming
N10 G90 G54
N20 G[1] X0 Y0 Z0 ; Move to start position
N30 G01 X50 Y50 F100 ; Linear cut Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using G01 instead of G00 causes slower moves.
Confusing G02/G03 (arc moves) with rapid moves.
✗ Incorrect
G00 is the command for rapid positioning, which reduces cycle time by moving quickly between points.
2fill in blank
mediumComplete the code to set the feed rate to optimize cutting speed.
CNC Programming
N40 G01 X100 Y100 F[1] ; Set feed rate for cutting
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Setting feed rate too high causes tool wear or poor finish.
Setting feed rate too low increases cycle time.
✗ Incorrect
A feed rate of 200 mm/min is a balanced speed for many cutting operations, optimizing cycle time without sacrificing quality.
3fill in blank
hardFix the error in the code to correctly use canned cycles for drilling to reduce cycle time.
CNC Programming
N50 G81 X50 Y50 Z-10 R2 F100 ; Drilling cycle N60 G[1] ; Cancel canned cycle
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using G81 again instead of G80 causes repeated drilling.
Using G82 or G90 does not cancel the cycle.
✗ Incorrect
G80 cancels the canned cycle, allowing the program to continue without repeating the drilling cycle.
4fill in blank
hardFill both blanks to optimize the tool path by combining moves and reducing air cutting.
CNC Programming
N70 G[1] X0 Y0 Z5 ; Rapid move to safe height N80 G[2] X100 Y100 ; Linear cut to point
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using G01 for rapid moves slows down the program.
Using G00 for cutting moves causes poor surface finish.
✗ Incorrect
G00 is used for rapid moves to safe height, and G01 is used for controlled linear cutting moves, optimizing cycle time.
5fill in blank
hardFill all three blanks to create a dictionary comprehension that maps tool numbers to their optimized feed rates, filtering only those above 100.
CNC Programming
optimized_feeds = { [1]: [2] for [3], rate in tool_feeds.items() if rate > 100 } Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same variable name for key and value.
Not filtering feed rates correctly.
✗ Incorrect
The comprehension maps each tool to its feed rate, filtering rates above 100. 'tool' and 'rate' are the key and value variables.