Objective. Students identify the major hardware components of a CNC mill and lathe, describe the role of the MCU and servo system, and explain how a G-code file moves from editor to machine motion.
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.
A Computer Numerical Control (CNC) machine uses a stored program of coded instructions to move cutting tools and workpieces along precise paths. Unlike manual machines that depend entirely on the operator's hands, a CNC machine reads a file—your G-code program—and drives motors to position axes within thousandths of an inch. Two machines you will operate throughout this program are the Haas VF-2 vertical machining center (mill) and the Haas ST-10 turning center (lathe).
---
The base and column are heavy cast-iron or polymer-composite castings that absorb vibration and hold all other components in rigid alignment. The table (mill) or headstock/tailstock (lathe) mounts the workpiece. Rigidity here directly affects dimensional accuracy, so never place extra weight on the table or hang tools off machine guarding.
CNC mills use a right-hand Cartesian coordinate system. Point your right hand so your fingers curl from the positive X axis toward the positive Y axis; your thumb points in the positive Z direction. On a vertical mill:
On a lathe, only two primary axes are used:
Some machines add a C axis (spindle rotation) or a Y axis for live-tool lathes.
The spindle holds and rotates the cutting tool (mill) or the workpiece (lathe chuck). It is driven by an AC servo or vector-drive motor. Spindle speed is commanded in RPM by the S word in G-code. Never reach into the work envelope when the spindle is enabled; use lockout/tagout (LOTO) before clearing chips by hand.
The Haas VF-2 uses a side-mount tool changer (SMTC) that stores up to 20 tools (standard carousel) and swaps them on a T word / M06 command. The ST-10 uses a turret that indexes to the called tool position. Ensure hands and tooling are clear of the carousel or turret before issuing a tool-change command.
Each axis is powered by a servo drive and servo motor pair. The drive receives a velocity or torque command from the control and supplies the corresponding current to the motor. A rotary encoder or linear scale mounted on each axis sends position feedback back to the control hundreds of times per second. This closed-loop path is called the position feedback loop, and it is what allows the machine to hold tolerances of ±0.0002" or better in normal production conditions.
---
The Machine Control Unit (MCU)—sometimes called the CNC controller—is the computer brain of the machine. On Haas machines it is the integrated control panel with its screen, keypad, and internal processor. The MCU performs three key jobs:
1. Interprets the G-code file line by line.
2. Calculates the required axis positions and feed rates using interpolation algorithms.
3. Commands the servo drives to move each axis simultaneously so the tool follows the programmed path.
The MCU also monitors alarms, manages tool-length offsets, and enforces soft travel limits that prevent the machine from crashing into its own structure.
---
| Step | What Happens | Data Format |
|------|-------------|-------------|
| 1. Design | Engineer or machinist creates a part drawing | CAD file (.dwg, .step, .iges) |
| 2. CAM | CAM software (e.g., Mastercam) reads the CAD geometry and generates toolpaths | CAM project file |
| 3. Post-Processing | CAM software runs a post-processor specific to the target machine/control | G-code text file (.nc, .tap, .cnc) |
| 4. Transfer | File is sent to the machine via USB, network (Ethernet/DNC), or typed directly at the control | Plain text |
| 5. Execution | MCU reads and executes each block; servo system moves axes; cutting happens | Real-world motion |
The post-processor is critical: it translates generic toolpath data into the exact dialect of G-code that a specific machine understands. A post written for a Haas mill will produce different code than one written for a Mazak or a Fanuc-based machine, even if the part geometry is identical.
---
A G-code file is a plain-text program made up of blocks (lines). Each block can contain:
Example block: `G01 X2.500 Y1.000 F10.0` commands a linear feed move to X 2.5, Y 1.0 at 10 inches per minute.
---
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.