Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to start the spindle in clockwise direction.
CNC Programming
M3 S[1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using M5 which stops the spindle instead of starting it.
Confusing spindle commands with movement commands like G1.
✗ Incorrect
M3 starts the spindle clockwise and S sets the spindle speed in RPM.
2fill in blank
mediumComplete the code to move the tool to X=50, Y=25, Z=10 in a straight line.
CNC Programming
G1 X[1] Y25 Z10 F200 Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong X coordinate values.
Confusing G1 with G0 which is rapid movement.
✗ Incorrect
G1 moves the tool in a straight line to the specified coordinates. X=50 is the correct X position.
3fill in blank
hardFix the error in the code to correctly define a 3D surface machining path.
CNC Programming
G1 X[1] Y20 Z-5 F150
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like 'twenty' instead of numbers.
Including extra letters like 'X' in the coordinate value.
✗ Incorrect
Coordinates must be numeric values without extra text. 30 is a valid X coordinate.
4fill in blank
hardFill both blanks to create a feed rate and spindle speed setting.
CNC Programming
F[1] S[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing feed rate and spindle speed values.
Using unrealistic values for feed or spindle speed.
✗ Incorrect
F sets the feed rate (150 mm/min) and S sets the spindle speed (1000 RPM).
5fill in blank
hardFill all three blanks to create a dictionary comprehension that maps axis names to their positions if position is above zero.
CNC Programming
{'X': [1], 'Y': [2], 'Z': [3] if [3] > 0 else 0} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same variable for all axes.
Not applying the condition correctly for Z axis.
✗ Incorrect
Each axis key maps to its respective position variable: x_pos, y_pos, and z_pos. The condition checks if z_pos is above zero.