← Back

18 CNC Programming & Setup Practice Questions & Answers

Every CNC Programming & Setup practice question from the Machinist Practice Test (NIMS Machining Level I), with the correct answer and a short explanation.

Start practice test
  1. 1. On a CNC mill, what is the essential difference between a G00 block and a G01 block?

    • A.G01 moves at the programmed feed rate, while G00 moves at the machine's rapid rate.Answer
    • B.G00 follows the exact straight line between the two points, while G01 does not.
    • C.Both G00 and G01 require an F word; only the order of the axis words differs.
    • D.G01 is used only for Z-axis plunges, while G00 is used for all X and Y motion.

    G01 is linear interpolation: the control coordinates the axes so the tool cuts a straight line at the feed rate carried in the F word, which is modal but must be present before the first cutting move. G00 is a positioning command executed at the machine's maximum traverse rate; it is meant for moving through air, and on many controls the axes may not arrive together, so the resulting path is not guaranteed to be the straight line between the points.

    Source: NIMS Machining Level I Standards, CNC Milling KSAO 8.1 (word address codes) / ISO 6983 definitions of G00 and G01Report a problem with this question

  2. 2. With G17 (XY plane) active, in which direction does an arc programmed with G03 travel?

    • A.Clockwise, as viewed looking from the positive Z direction down onto the XY plane.
    • B.Counterclockwise, as viewed looking from the positive Z direction down onto the XY plane.Answer
    • C.Whichever direction the signs of the I and J words indicate.
    • D.Counterclockwise, as viewed from underneath the table looking up at the workpiece.

    The direction convention is defined by the viewpoint: you look at the active plane from the positive direction of the axis perpendicular to it. For G17 that means looking down the +Z axis at the XY plane, where G02 is clockwise and G03 is counterclockwise. The I and J words locate the arc center; they do not set the direction of travel.

    Source: ISO 6983 / EIA RS-274 circular interpolation convention; NIMS Machining Level I Duty 2.9 (linear and circular interpolation)Report a problem with this question

  3. 3. In a circular interpolation block such as G02 X2.5 Y1.0 I0.75 J0.0 F8.0, what do the I and J words specify?

    • A.The absolute X and Y coordinates of the arc endpoint.
    • B.The incremental distances from the arc start point to the arc endpoint.
    • C.The incremental distances from the arc start point to the arc center.Answer
    • D.The incremental distances from the arc center to the arc endpoint.

    I, J and K are arc-center vectors measured incrementally from the point where the tool starts the arc to the arc's center, with I parallel to X, J to Y and K to Z. They are always signed and always incremental regardless of whether G90 or G91 is active, because the endpoint words already give the destination; the control needs the center to know the radius and sweep.

    Source: ISO 6983 arc-center (I/J/K) vector convention; NIMS Machining Level I CNC Milling Programming competencyReport a problem with this question

  4. 4. What does G41 do when it is commanded with a D word on a CNC mill?

    • A.It shifts the tool to the right of the programmed path and is the code that produces climb milling.
    • B.It offsets the tool downward in Z by the amount stored in the H register.
    • C.It cancels any active cutter compensation and returns the tool to the programmed path.
    • D.It offsets the tool to the left of the programmed path by the amount stored in the D register.Answer

    Cutter radius compensation offsets the tool centerline away from the programmed profile line by the value in the D register, and the side is defined by standing behind the tool and looking in the direction it is traveling: G41 is left, G42 is right. G41 does not by itself mean climb or conventional milling — whether the cut climbs depends on the spindle rotation and whether the contour is an inside or outside feature.

    Source: ISO 6983 / EIA RS-274 cutter radius compensation; NIMS Machining Level I CNC Milling Programming competency (G40/G41/G42)Report a problem with this question

  5. 5. A block reads: N70 G43 H03 Z1.0 M08. What does the G43 H03 accomplish?

    • A.It turns on tool length compensation using the value in offset register H03.Answer
    • B.It selects work coordinate system number 3 for this tool.
    • C.It applies the cutter radius stored in register D03 to the Z move.
    • D.It cancels tool length compensation and sends the spindle back to machine zero in Z before the next tool change is commanded.

    G43 activates tool length compensation and tells the control to add the number in the H register named in the block to every commanded Z position, so a Z1.0 command puts the tool tip 1.0 in. above part zero regardless of how far that particular tool sticks out of the spindle. Shops nearly always load the offset for tool 3 into H03 so a mismatched H number is easy to spot; G49 is the code that cancels the compensation.

    Source: G43/H tool length compensation convention (G49 cancel); NIMS Machining Level I Setup — tool length offsetsReport a problem with this question

  6. 6. A part is machined with cutter radius compensation active and D01 set to .2500 for a .500 in. end mill. The finished outside profile measures .008 in. larger than print across its width. What is the correct correction?

    • A.Change D01 to .2540.
    • B.Change D01 to .2460, moving the cutter .004 in. closer to the programmed path per side.Answer
    • C.Re-post the program with the profile moved .004 in. inward.
    • D.Lower the Z depth of cut by .004 in. and run the profile again.

    The control offsets the tool centerline from the programmed line by the D value, so the D register is the sizing control for a compensated profile. An outside feature .008 in. oversize across the width is .004 in. oversize per side, and reducing D by .004 in. moves the cutter that much closer to the programmed contour on both sides, which is why NIMS expects profile tolerance to be held by editing the offset rather than by rewriting the program.

    Source: NIMS Machining Level I CNC Milling performance standard (profile position ±.006) — sizing by cutter radius (D) offset adjustmentReport a problem with this question

  7. 7. Where must cutter radius compensation (G41 or G42) be commanded so the control can apply it correctly?

    • A.In a circular G02 or G03 block, so the cutter eases smoothly onto the contour.
    • B.In the same block as the M06 tool change.
    • C.In a linear approach move at least as long as the cutter radius.Answer
    • D.In the same block as the final Z plunge, so that compensation and depth of cut begin at exactly the same moment.

    The control needs a straight approach block to ramp the tool center off the programmed line to the offset position, and the block must be at least as long as the offset amount or the geometry cannot be resolved. Commanding G41/G42 in an arc, or in a block shorter than the cutter radius, typically triggers an alarm or gouges the part, and the same rule applies to G40 when compensation is cancelled on the way out.

    Source: Cutter radius compensation ramp-on/ramp-off rule (G41/G42/G40 must be commanded in a linear move); NIMS Machining Level I CNC Milling ProgrammingReport a problem with this question

  8. 8. What information is stored in the G54 through G59 registers on a CNC machining center?

    • A.The length of each tool, measured from the spindle gauge line to the tool tip.
    • B.The radius of each cutter that will be used with G41 or G42.
    • C.The peck depth and dwell values used by the holemaking canned cycles.
    • D.The distance from machine zero to the part zero of each workholding position.Answer

    Work (fixture) offsets hold the X, Y and Z distances from the machine's home position to the program origin the part was programmed around, which is why the same part program can run in several vise positions simply by calling a different G-code in the 54–59 group. Tool lengths live in the H registers and cutter radii in the D registers.

    Source: G54–G59 work/fixture offset convention; NIMS Machining Level I Setup — establishing program zeroReport a problem with this question

  9. 9. An operator picks up the left-hand edge of a part with a .200 in. diameter edge finder and zeroes the X display the instant the tip kicks out. How far must the spindle centerline be moved toward the part to sit exactly over that edge?

    • A..100 in.Answer
    • B..050 in.
    • C..200 in.
    • D.No move is needed; the display already reads the edge.

    At the moment an edge finder kicks over, its tip is running true against the surface, so the spindle centerline is one tip radius away from the edge — half of .200 in., or .100 in. Setting the work offset therefore requires accounting for that half-diameter in the correct direction; forgetting it or halving it twice leaves the part zero off by an amount larger than most Level I position tolerances.

    Source: NIMS Machining Level I Setup KSAO — establishing X/Y zero with an edge finder (compensate half the tip diameter)Report a problem with this question

  10. 10. The tool is at X2.0 Y1.0 in absolute mode and must move in a straight line to the point X5.0 Y3.0. Which incremental block makes that same move?

    • A.G91 X5.0 Y3.0
    • B.G91 X3.0 Y2.0Answer
    • C.G91 X-3.0 Y-2.0
    • D.G91 X7.0 Y4.0

    Under G90 every coordinate is measured from part zero, but under G91 each word is the signed distance from where the tool is right now, so the move is 5.0 - 2.0 = 3.0 in X and 3.0 - 1.0 = 2.0 in Y. The same destination therefore carries completely different numbers in the two modes, and because incremental moves chain off one another, any single mistake shifts every position that follows.

    Source: ISO 6983 G90 absolute vs G91 incremental positioning; NIMS Machining Level I Duty 2.9 (Cartesian coordinate programming)Report a problem with this question

  11. 11. In the block G83 X1.0 Y1.0 Z-1.500 R0.100 Q0.250 F6.0, what does the Q word specify?

    • A.The dwell time at the bottom of the hole.
    • B.The final Z depth of the finished hole.
    • C.The incremental depth of each peck.Answer
    • D.The height of the rapid plane above the workpiece.

    G83 is the deep-hole peck cycle, and Q is the incremental amount the drill advances on each peck before it retracts to clear chips, so a 1.500 in. deep hole with Q0.250 is drilled in six bites. Z is the final depth, R is the rapid plane and a dwell would be programmed with P, which is why the peck value must be entered as Q.

    Source: ISO 6983 fixed (canned) cycle word definitions — G83 peck drilling, Q = peck incrementReport a problem with this question

  12. 12. A plate is held by strap clamps that stand above the top surface, and holes must be drilled on both sides of a clamp. Which return-plane code should be in effect, and why?

    • A.G99, because it returns the tool to the R plane between holes.
    • B.G98, because it holds the tool at the bottom of each hole until the cycle is cancelled.
    • C.G80, because it retracts the tool fully between each hole.
    • D.G98, because it returns the tool to the initial plane, which can be set above the clamps.Answer

    G99 retracts only to the R plane, which is normally a tenth of an inch or so above the part and would drag the drill straight into a clamp on the way to the next hole. G98 sends the tool back to the initial plane established before the cycle began, so setting that Z height above the tallest obstruction lets the tool clear clamps, steps and fixtures between positions.

    Source: ISO 6983 canned-cycle return plane definitions — G98 initial plane vs G99 R planeReport a problem with this question

  13. 13. What is the safest way to prove out a new program on the machine for the first cut?

    • A.Run it in single block with the rapid and feed overrides turned down, watching the distance-to-go display.Answer
    • B.Run the program at 100% rapid and feed with the machine door open so the operator can watch the tool path closely and press reset if something looks wrong.
    • C.Use block delete to skip all of the Z moves and run the program once through.
    • D.Turn the Z work offset down .100 in. so the first pass takes a heavier cut.

    Single block stops the control at the end of every block, and reduced overrides mean any wrong move creeps rather than crashes, while the distance-to-go readout shows where the axis is actually headed before it gets there. Running with the door open defeats the interlock and guarding, block delete only skips slashed blocks, and lowering the Z offset makes a mistake deeper rather than safer.

    Source: NIMS Machining Level I CNC Operations — program verification and machine control functions (single block, feed/rapid override, distance-to-go)Report a problem with this question

  14. 14. How does an M01 in a program behave?

    • A.It halts the program unconditionally at that block and requires the cycle start button to be pressed to continue.
    • B.It stops the program only when the operator's optional stop switch is turned on.Answer
    • C.It stops the spindle but allows the rest of the program to keep running.
    • D.It ends the program and rewinds the control to the first block.

    M01 is the optional stop: the control acts on it only when the operator has enabled the optional stop function on the panel, which lets a programmer place inspection or chip-clearing breaks in a program without slowing down a proven production run. M00 is the unconditional stop, M05 stops the spindle, and M30 ends the program and rewinds it.

    Source: EIA RS-274 miscellaneous (M) function definitions — M00 program stop, M01 optional stop, M30 end of program and rewindReport a problem with this question

  15. 15. Consider these blocks: N70 G81 G99 Z-0.500 R0.100 F5.0 / N80 X2.0 / N90 X3.0 / N100 G80. How many holes are drilled?

    • A.One
    • B.Two
    • C.ThreeAnswer
    • D.None, because G81 needs an L word before it will execute

    Canned cycles are modal: the cycle drills once at the position in effect when it is called, and then repeats the entire drill-and-retract sequence at every new X or Y position commanded afterward until G80 cancels it. Here that is the hole at the current position in N70 plus the holes at X2.0 and X3.0, for three holes total.

    Source: ISO 6983 fixed cycles are modal until cancelled by G80; NIMS Machining Level I KSAO 8.1 (reading a word address program)Report a problem with this question

  16. 16. A 1/4-20 tap is run in a G84 cycle at 300 RPM. What feed rate in inches per minute must be programmed?

    • A.F0.05
    • B.F6.0
    • C.F20.0
    • D.F15.0Answer

    A tap must advance exactly one thread pitch per spindle revolution or it will strip the thread or snap, so the feed rate is pitch multiplied by RPM. The pitch of a 20-thread-per-inch tap is 1 divided by 20, or .050 in., and .050 x 300 = 15.0 in. per minute.

    Source: NIMS Machining Level I Applied Mathematics — tapping feed rate = spindle RPM x thread pitch (G84)Report a problem with this question

  17. 17. A job calls for 300 SFM with a .500 in. diameter end mill. Using the shop formula RPM = (SFM x 3.82) / diameter, what spindle speed should be programmed?

    • A.2,292 RPMAnswer
    • B.1,146 RPM
    • C.573 RPM
    • D.4,584 RPM

    The 3.82 constant is simply 12 divided by pi, so the formula converts surface feet per minute into revolutions for a given cutter diameter: 300 x 3.82 = 1,146, divided by .500 gives 2,292 RPM. The diameter in the denominator must be the cutter's full diameter, not its radius, which is the usual source of an answer that is off by a factor of two.

    Source: NIMS Machining Level I Applied Mathematics — RPM = (SFM x 3.82) / cutter diameterReport a problem with this question

  18. 18. A 4.000 in. diameter bolt circle is centered on part zero (X0 Y0). One hole lies 30 degrees counterclockwise from the +X axis. What are its X and Y coordinates?

    • A.X1.0000 Y1.7321
    • B.X1.7321 Y1.0000Answer
    • C.X3.4641 Y2.0000
    • D.X2.0000 Y2.0000

    Converting a polar hole location to rectangular coordinates uses X = R cos(angle) and Y = R sin(angle), with R being the bolt circle radius of 2.000 in., not the 4.000 in. diameter. That gives X = 2.000 x .8660 = 1.7321 and Y = 2.000 x .5000 = 1.0000; swapping sine and cosine or using the diameter produces the other choices.

    Source: NIMS Machining Level I Duty 2.9 / Applied Mathematics — polar-to-rectangular conversion, X = R cos(theta), Y = R sin(theta)Report a problem with this question

Practice questions based on NIMS/ANSI 101-2001, Duties and Standards for Machining Skills Level I, and the published content of the NIMS Machining Level I theory exams, together with standard precision-machining practice. NIMS is a mark of the National Institute for Metalworking Skills; this site is not affiliated with or endorsed by NIMS. Machining Level I is a set of separate credentials, and most of them also require a hands-on performance test that this bank does not cover. The NIMS theory exams are open-reference, but questions here never depend on recalling a handbook table value, a citation number or a machine rating — always work from the print in front of you, your employer's written procedures, and the machine's own documentation, and confirm current requirements before testing. About the NIMS machining credentials →