Being handed a program printout and asked “what does this do?” is a classic interview moment. The trick is to read it in a fixed order rather than panicking down the page line by line. A program has a structure, and reading it in that structure makes it explain itself.
Read it in this order
- The setup block. Units (
G20orG21), positioning mode (G90orG91), and the work offset (G54toG59). These govern everything after, so read them first. - Spindle and tool. The tool call and tool change, and the spindle start (
M03) with its speed. - The motion, line by line. Now read the moves, watching the modal state carry forward, a
G01stays active until changed, as covered in modal vs non-modal G-codes. - The ending. Spindle off (
M05), retract, and program end (M30).
Narrate as you go. Saying “millimeters, absolute, work offset 1, tool 2, spindle on at 1500” out loud shows the interviewer your method, not just your answer.
What to read at each stage
| Stage | Look for | Codes |
|---|---|---|
| Setup | Units, mode, offset | G20/G21, G90/G91, G54 |
| Spindle/tool | Tool change, spindle on | M06, M03, S |
| Motion | Rapids and feeds | G00, G01, G02/G03 |
| Ending | Spindle off, end | M05, M30 |
Practice the method
The order only works if each line is instant, so build recall of the common G-codes and common M-codes with beginner CNC code practice, and practice on the most basic G-code program example. For the surrounding interview, see will a machine shop test my G-code knowledge. A free tool like G-Code Sprint makes each line instant so the order does the rest.
Bottom line
Read a G-code print in a fixed order: setup first, then spindle and tool, then motion line by line, then the ending. Narrate as you go. A consistent order plus fluent recall turns a scary printout into a straightforward read.
Sources
Frequently asked questions
How do you read a G-code program quickly?
In a fixed order: first the setup block (units, positioning mode, work offset), then the spindle and tool setup, then the motion line by line. Track the modal state as it carries forward. A consistent order beats reading randomly under pressure.
What should I look for first in a G-code printout?
The setup: units (G20 or G21), positioning mode (G90 or G91), and the work offset (G54 to G59). These govern how every following line is interpreted, so reading them first means the rest makes sense.
How do I get better at reading G-code for an interview?
Practice scanning real programs in the same order every time, and drill the codes so each line is instant. A free tool like G-Code Sprint builds the recall; then reading a print is just applying it in order.
G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.