🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Manufacturing & Marine › CNC Machining › Capstone Project: Full-Cycle CNC Part Production › Lesson 2
MFG-CNC14-08 · Lesson 2 · 54 clock hours · lab

CAM Programming, G-Code Verification, and Setup Documentation

Objective. The student programs the complete capstone part in Mastercam, post-processes verified G-code for the shop's Haas control, and produces finalized setup sheets and tool offset sheets that a second person could use to run the job without additional verbal instruction.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by a licensed engineer or certified journey-level tradesperson or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

CAM Programming, G-Code Verification, and Setup Documentation

This lab brings together every skill you have built during the program. You will program your capstone part from scratch in Mastercam, generate and verify Haas-compatible G-code, and produce a setup sheet package complete enough that a second machinist can run the job with zero help from you. That last requirement is not a formality — it is the professional standard in production shops and it mirrors what NIMS and the Mastercam Associate credential both evaluate.

From Drawing to Toolpath in Mastercam

Begin by importing or redrawing your approved 2D geometry in Mastercam. Check that all geometry is clean: no duplicate lines, no open chains, and no stray points. Assign stock that matches the actual raw material blank — dimensions, material, and any pre-machined surfaces. Incorrect stock definition is one of the most common causes of false air-cuts or hidden collisions later, so your instructor must initial your checklist before you build any toolpath.

Build toolpaths operation by operation, following your approved process plan. Roughing toolpaths should leave finish stock (typically 0.010 in–0.030 in on the walls and floor for steel; check your process plan). Select cutting tools from the library that match the physical tools in your setup. Verify spindle speeds and feed rates against your process plan calculations — Mastercam will suggest values, but you are responsible for confirming they are safe for the work material and the machine's horsepower. A second instructor checkpoint is required after the first roughing toolpath. The final finish toolpath requires a third checkpoint before you are permitted to post-process.

Post-Processing and G-Code Verification

Post-processing translates Mastercam's internal toolpath data into machine-specific G-code using a post-processor file matched to your shop's Haas control. Use the correct Haas post for your machine model (mill vs. lathe, control generation). After post-processing, immediately open the NC file in a text editor and read through it before running anything.

On the printed code annotation worksheet, highlight or label:

Next, run the program in Haas simulation mode or in Vericut if your lab has it. A dry-run cycle time check records how long the simulation takes and compares it to your estimate. If the simulation shows a collision or an alarm, stop, identify the root cause in the code or toolpath, correct it in Mastercam, re-verify, and re-post. Do not proceed until the simulation is clean. Sign and date the annotation worksheet only after zero collisions are confirmed.

Building the Setup Sheet Package

A professional setup sheet package has one page per setup (one page if you flip the part, a new page for each new vise or fixture orientation). Each page must show:

1. Machine identification — model, control type.

2. Workholding — vise model or fixture name, jaw position, clamping torque if specified, and a clear sketch showing where the part sits relative to the vise jaws.

3. Part zero (work zero) location — a dimensioned sketch indicating the exact corner, center, or surface that is G54 X0 Y0 Z0. Ambiguity here causes scrapped parts.

4. Tool list — tool number, description, diameter, length, cutting material (carbide vs. HSS), and blank columns for the operator to record measured tool length offsets and diameter offsets.

5. Special notes — torque specs, fragile features, minimum chip-load warnings, or coolant requirements.

After the setup sheet, write a one-paragraph first-article checklist naming the five measurements to confirm before running full production. Choose measurements that catch the most critical dimensions on your part — typically a datum surface, a tight-tolerance bore or slot width, a critical depth, a true position, and a surface finish check. State the nominal, the tolerance, and the measuring instrument to use (e.g., "Measure bore diameter with a bore gauge to confirm 1.250 ± 0.001 in before approving the first article").

Safety Points for This Lab

Never transfer an unverified NC file to the machine. Simulation must complete cleanly before any USB or DNC transfer. When physically handling USB drives or DNC cables near the machine, the machine must be in E-stop or in a confirmed safe state. If the machine is on, apply lockout/tagout (LOTO) procedures before connecting or disconnecting any cable to the control cabinet.

Wear safety glasses at all times in the lab, even at a workstation near a running machine. If you approach the machine to check a setup, wear safety glasses and closed-toe leather shoes. Keep hair and loose clothing secured.

Do not override feed-rate or spindle-speed limits without instructor permission. A programming error that sends the spindle into a clamp at rapid speed (G00) can break tooling, damage the machine, and injure anyone nearby.

Credential Connection

The Mastercam Associate exam tests your ability to build correct toolpaths, assign proper stock and tools, and produce a post-processed file — exactly what you do here. The instructor will compare your Mastercam file against the Mastercam Associate competency checklist; you must satisfy at least 80% of items. NIMS Machining Level 1 and Level 2 standards emphasize process planning, setup documentation, and part measurement — all reflected in your setup sheet package and first-article checklist. Haas certification covers control operation, offset entry, and program management, which align directly with your G-code annotation and simulation steps.

Key terms9

Post-processorA software configuration file that converts Mastercam's generic toolpath data into G-code formatted for a specific machine control, such as a Haas mill or lathe.
Work offset (G54–G59)A stored coordinate value in the Haas control that tells the machine where part zero is located relative to the machine's home position; each G54–G59 register holds a separate XYZ location.
Canned cycleA pre-programmed, fixed G-code routine for repetitive operations such as drilling (G81), peck drilling (G83), or tapping (G84), reducing the number of blocks needed in the program.
Dry-run simulationRunning the NC program in machine simulation software or in the control's graphics mode without cutting material, to verify motion paths, detect collisions, and estimate cycle time before actual machining.
Setup sheetA one-page-per-setup document that provides all information a machinist needs to load, locate, and tool up the job — including workholding position, part zero sketch, and tool list — without verbal instruction.
First-article checklistA written list of critical measurements to inspect and approve on the very first finished part before authorizing a full production run, confirming that the setup and program produce conforming parts.
Finish stockA thin layer of material, typically 0.010–0.030 in, intentionally left by roughing toolpaths and removed by finishing toolpaths to achieve final dimensional accuracy and surface finish.
Tool length offset (TLO)A value stored in the Haas control that compensates for the measured length of each cutting tool, ensuring the programmed Z depth corresponds to the correct position on the part.
DNC (Direct Numerical Control) transferA method of sending an NC program from a computer directly to a machine control over a cable or network connection, used when program files are too large for manual entry or a USB drive is not the preferred method.

Worked examples4

1. Your Mastercam simulation shows a total cycle time of 18 minutes 30 seconds. The acceptance criterion is that actual cycle time must be within 15% of your estimate. What is the allowable range of actual cycle times?
  1. Convert the estimated cycle time to seconds for easy arithmetic: 18 min × 60 + 30 s = 1,110 s.
  2. Calculate 15% of 1,110 s: 0.15 × 1,110 = 166.5 s.
  3. Subtract to find the low end of the range: 1,110 − 166.5 = 943.5 s = 15 min 43.5 s.
  4. Add to find the high end of the range: 1,110 + 166.5 = 1,276.5 s = 21 min 16.5 s.
  5. Round to the nearest second: acceptable range is 15 min 44 s to 21 min 17 s (approximately).
Answer: The actual cycle time must fall between approximately 15 min 44 s and 21 min 17 s to be within 15% of the 18 min 30 s estimate.
2. You are writing the tool list on your setup sheet. Tool 3 is a 0.500 in diameter, 4-flute carbide end mill. During setup the operator measures its length as 3.847 in from the spindle gauge line. The previous setup had T3 at 3.612 in. How much does the operator need to change the stored Tool 3 length offset, and in which direction?
  1. New measured length: 3.847 in. Old stored offset: 3.612 in.
  2. Difference: 3.847 − 3.612 = +0.235 in.
  3. Because the tool is longer than what was stored, the length offset must increase by 0.235 in.
  4. The operator enters the new value (3.847 in) into the tool length offset register for T3, or adds +0.235 in to the existing value, depending on the control's input method.
Answer: The Tool 3 length offset must increase by 0.235 in; the operator updates the register to 3.847 in (or adds +0.235 in to the previous value).
3. Your process plan calls for a roughing pass that leaves 0.020 in of finish stock on the walls of a pocket that has a final width of 2.500 in. What width should you program the roughing toolpath's stock-to-leave value to produce, and what will the pocket wall-to-wall dimension be after roughing?
  1. Final pocket width (after finishing): 2.500 in.
  2. Finish stock is left on each wall, so total material left = 0.020 in per wall × 2 walls = 0.040 in total across the width.
  3. Roughing will cut the pocket to: 2.500 − 0.040 = 2.460 in wall-to-wall.
  4. In Mastercam, set the stock-to-leave on walls to 0.020 in; the software automatically applies this to both walls.
Answer: Program 0.020 in stock-to-leave on walls. After roughing, the pocket will measure 2.460 in wall-to-wall, leaving 0.020 in per side for the finishing pass to bring it to 2.500 in.
4. Your setup sheet specifies part zero at the top-left corner of the stock. When you probe the corner at the machine, the Haas display shows X = −6.2340, Y = 3.1150, Z = −2.0070 in the machine coordinate system. What values do you enter into the G54 work offset register?
  1. The G54 register stores the machine-coordinate position of part zero.
  2. X offset to enter: −6.2340
  3. Y offset to enter: 3.1150
  4. Z offset to enter: −2.0070
  5. Navigate to the Haas Offset page, select Work Offsets, select G54, and type each value into the X, Y, and Z fields, pressing Enter after each.
Answer: Enter G54 X = −6.2340, Y = 3.1150, Z = −2.0070 exactly as probed, because those machine coordinates define the location of part zero in the G54 register.

The math in this lesson2

Learners find the allowable cycle-time range within 15 percent of a Mastercam estimate.
7.RP.3N-Q.3
Brush up in the math halls at newSchoolWorks.com:
In class: Students model or import the 2D drawing geometry into Mastercam, assign stock, and build toolpaths for each operation from the approved process plan; instructor checkpoints are required at: stock definition, first roughing toolpath, and final finish toolpath before post-processing is permitted — each checkpoint is initialed on the student's checklist · Post-process the verified Mastercam file to a Haas-compatible NC file; open the G-code in a text editor and in the Haas simulator or Vericut (where available), perform a dry-run cycle time check, and annotate the code printout highlighting work offset calls (G54–G59), tool change blocks, and any canned cycles used — students correct any alarms or collisions before signing off · Complete the Setup Sheet Package: one page per setup, showing machine, vise/fixture jaw position and torque, part zero location with a sketch, tool list with offset columns, and any special notes; additionally write a one-paragraph 'first-article checklist' describing the five measurements to confirm before running full production
Materials: Mastercam (current version licensed on lab workstations), Haas post-processor, Haas Mill and Lathe Operator Manuals, Vericut or Haas simulation mode, Setup Sheet template, G-code annotation worksheet, Mastercam Associate certification study guide, USB or DNC transfer cable
Check: Instructor and a peer independently attempt to set up the machine using only the student's setup sheet package (no verbal help from the student); setup must be achievable with zero requests for clarification; G-code simulation must show zero collisions and a cycle time within 15% of the student's estimate; Mastercam toolpath file is evaluated against the Mastercam Associate exam competency checklist — minimum 80% of checklist items satisfied

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Mastercam Associate — CAM programming workflow
1. Before post-processing a Mastercam file, the instructor must initial which three checkpoints on the student's checklist?
Haas Certification — control operation and G-code
2. In a Haas NC program, what is the purpose of the G54 block?
NIMS Machining — safe CNC operation and process verification
3. A student's Mastercam simulation shows a toolpath where the tool rapids (G00) directly from one pocket to another without retracting to the safe Z clearance plane, passing through a clamp. What is the correct action?
Haas Certification — G-code and canned cycles
4. Which G-code is most commonly used for a peck drilling canned cycle on a Haas mill?
NIMS Machining — setup and workholding
5. A setup sheet's part-zero sketch shows Z0 at the top surface of the finished stock. During setup, the operator measures the raw stock and finds it is 0.015 in taller than the drawing dimension. What is the correct response before running the program?
NIMS Machining — quality and inspection
6. The first-article checklist in the setup sheet package serves which primary purpose?
NIMS Machining — safety, LOTO, and shop procedures
7. When connecting a DNC cable to a Haas control to transfer an NC file, what machine state is required first?
Mastercam Associate — certification competency standards
8. The Mastercam Associate competency checklist requires a minimum score of 80% for the capstone to pass. If the checklist has 25 items, what is the minimum number of items the student's Mastercam file must satisfy?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.