CNC G-Code & M-Code Programming 2 — Questions and Answers
Question 1: Which G-code cancels cutter radius compensation?
- G40 (Correct answer)
- G41
- G42
- G43
Correct answer: G40
G40 cancels cutter radius compensation (left or right) that was previously activated.
Question 2: What does the address 'F' specify in a CNC program?
- Feed rate (Correct answer)
- Fixture offset
- Final position
- Function code
Correct answer: Feed rate
The F address defines the feed rate, typically in inches per minute (IPM) or millimeters per minute (mm/min).
Question 3: M06 is used to command which machine function?
- Tool change (Correct answer)
- Spindle stop
- Coolant on
- Program end
Correct answer: Tool change
M06 initiates an automatic tool change on CNC machining centers.
Question 4: In G-code, what does G17 specify?
- XY plane selection (Correct answer)
- XZ plane selection
- YZ plane selection
- UV plane selection
Correct answer: XY plane selection
G17 selects the XY plane, which is required for circular interpolation arcs in that plane.
Question 5: Which M-code turns the spindle on in the counter-clockwise direction?
- M04 (Correct answer)
- M03
- M05
- M02
Correct answer: M04
M04 starts the spindle rotating in the counter-clockwise (CCW) direction.
Question 6: What is the purpose of G91 in a CNC program?
- Incremental positioning mode (Correct answer)
- Absolute positioning mode
- Return to home position
- Set work coordinate origin
Correct answer: Incremental positioning mode
G91 switches the control to incremental mode where all coordinates are relative to the current tool position.
Question 7: Which code in a CNC turning program specifies the spindle speed in surface feet per minute?
- G96 (Correct answer)
- G97
- G95
- G94
Correct answer: G96
G96 activates Constant Surface Speed (CSS) mode, where spindle RPM automatically adjusts to maintain a constant surface speed as diameter changes.
Which G-code cancels cutter radius compensation?