CNC CNC G-Code and Programming 2 — Questions and Answers
Question 1: What is the purpose of a G54 command in CNC programming?
- Sets tool length offset
- Selects work coordinate system 1 (Correct answer)
- Initiates a canned drilling cycle
- Cancels all offsets
Correct answer: Selects work coordinate system 1
G54 selects Work Coordinate System 1, which tells the machine where the workpiece origin is located on the table.
Question 2: Which canned cycle code is used for a standard drilling operation in CNC?
- G73
- G80
- G81 (Correct answer)
- G83
Correct answer: G81
G81 is the standard drilling canned cycle that drills to a specified depth and retracts at rapid feed rate.
Question 3: What does the R-value represent in a canned drilling cycle?
- Rapid traverse rate
- Retract plane height above the work surface (Correct answer)
- Radius of the drill
- Repetition count
Correct answer: Retract plane height above the work surface
The R-value in a canned cycle specifies the retract plane, which is the height the tool returns to between drilling operations.
Question 4: In CNC programming, what does G96 activate?
- Constant rapid mode
- Constant surface speed (CSS) mode (Correct answer)
- Constant chip load mode
- Constant coolant pressure
Correct answer: Constant surface speed (CSS) mode
G96 activates Constant Surface Speed (CSS) mode, which automatically adjusts spindle RPM as the tool diameter changes.
Question 5: Which character is used to indicate a program end and rewind in a CNC program?
- M00
- M01
- M02
- M30 (Correct answer)
Correct answer: M30
M30 ends the CNC program and rewinds it to the beginning, resetting the program pointer for the next run.
Question 6: What is the purpose of using subroutines (M98/M99) in CNC programming?
- To increase spindle speed dynamically
- To repeat a set of operations without rewriting the code (Correct answer)
- To change tool offsets automatically
- To trigger an alarm condition
Correct answer: To repeat a set of operations without rewriting the code
M98 calls a subroutine and M99 returns from it, allowing repeated patterns or operations to be written once and reused.
What is the purpose of a G54 command in CNC programming?