On the first day of starting a computer, the thing that worries newbies the most is not the programming but the fear of pressing a wrong button and causing a knife to crash into the vise. That fear is well-founded: most tool collision incidents in the workshop stem from three very basic causes such as wrong tool offset, wrong workpiece origin, and skipping the test run step. All three can be prevented by a standard operating procedure, done in the correct order, without skipping steps.
This is a guide to operating a CNC machine written for people who have never operated a machine: starting from the structure and coordinate system, moving to the control panel and modes, the minimum set of G-codes needed, then going through the 9-step process from turning on the power at the beginning of the shift to shutting down the machine at the end of the shift. Attached are safety principles, common error tables with solutions, maintenance schedule and 6-month self-study schedule.
The content applies to both CNC milling machines (vertical machining centers - VMC) and CNC lathes, with popular control systems in Vietnam such as Fanuc, Mitsubishi and Siemens. Specific operations may vary slightly between brands, but the thought process is the same.
What is CNC machine operation?
CNC machine operation is the job of setting up and controlling CNC machine tools to turn a machining program into parts that meet the required tolerances - including workpiece mounting, tool mounting, origin setting, program loading, test running, machining supervision and product testing.
CNC (Computer Numerical Control - computer numerical control) is a development step from NC. The first NC machines appeared in the 1940s–1950s, reading commands from punched tape; As computer prices fell, numerical controllers were integrated directly into the machine, allowing programming to be edited on the spot
CAD - CAM - Post - Machine production chain
A part goes through four stages before taking shape:
-
CAD - build 2D/3D models of finished products.
-
CAM - select tool, set cutting parameters, generate toolpath.
-
Post processor - translates toolpaths into G-code in the correct format for each machine and control system.
-
Operation - setting up the machine, loading the program, running and monitoring.
Note for workshops: using CAM software of unknown origin or a post processor that is not compatible with the machine is a common cause of errors and crashes on the first run.
>> Learn more about CNC machine
What capabilities do operators need?
The operator does not have to be a programmer, but is required to:
-
Can read technical drawings and understand tolerances and surface roughness.
-
Read and understand G-code at a basic level to know what the machine is about to do.
-
Proficient in using calipers, micrometers, dial gauges and gauges.
-
Recognize abnormal sounds, vibrations and chip coating to stop the machine promptly.
-
Follow process discipline: do not skip the test run step even when the order is urgent.

CNC machine structure and coordinate system must be understood before pressing the button
Without understanding the coordinate system, all subsequent operations are just learned by rote. This is a required background.
Main clusters on the machine
|
Cluster |
Role |
Mistakes newbies often make |
|
Body and slide |
Supports the structure, determines its rigidity |
Allow chips to accumulate and scratch the guide groove |
|
Spindle |
Turn the tool with a milling machine, turn the workpiece with a lathe |
Run at high speed when the main shaft has not yet warmed up |
|
Machine table and fixtures |
Position and hold the workpiece tightly |
A misaligned jig or lack of clamping force causes the workpiece to move |
|
Bearing and ATC |
Stores and changes tools automatically according to command M06 |
Install the knife in the wrong position compared to the knife list |
|
Controller |
Read G-code and output commands to servo |
Click Reset to clear the alarm without finding the cause |
|
Servo and encoder system |
Closed loop position control |
Ignore unusual hissing or vibrations |
|
Coolant system |
Cool down the cutting area and eject chips |
Run the solution dry, the concentration is wrong |
Commercial metal processing machines use closed-loop control: the encoder continuously feedbacks the actual position to the controller to compensate for errors, unlike open-loop control on low-cost machines.
Axis system and two types of coordinate origins
Vertical milling machines use three basic axes: X runs horizontally, Y runs vertically, and Z goes up and down along the main axis. Add spindle A, B or C to make a 4–5 spindle machine. Conventional lathes only have X and Z.
Newcomers need to clearly distinguish two roots:
-
Machine Zero — fixed point set by the manufacturer, the machine finds it again by zero return at the beginning of each shift. Many machines don't know where they are when they turn on the power, so this step should not be skipped.
-
Work Zero — the zero point set by the operator on the workpiece, stored in tables G54–G59. The program runs under this root.
Some terms will come up again and again: backlash is mechanical play when reversing, chatter is a vibration phenomenon when cutting usually caused by a dull knife or large play, and crash is an unintended collision that damages the tool, workpiece or machine.
Important modes and keys when operating
The Fanuc control panel has hundreds of keys, but newbies only need to grasp the following to safely operate the machine. Mitsubishi and Siemens systems have different names but equivalent functions.
Six operating modes
|
Mode |
When to use? |
|
REF/ZRN |
Return to the base of the machine head or after releasing the E-stop |
|
JOG |
Move the axis continuously with the arrow keys, used when bringing the tool close to the workpiece |
|
HANDLE/MPG |
Turn the electronic handwheel in steps of 0.001 - 0.01 - 0.1 mm, used when leaking the base of the workpiece |
|
MDI |
Type a few commands directly to try, for example calling a tool or rotating a spindle |
|
EDIT |
Compose, edit, and delete programs stored in the device |
|
AUTO/MEM |
Run the program automatically from start to finish |
Extremely important operation: always check what mode you are in before pressing any button. A lot of crashes happen because you think the machine is in JOG but the machine is in AUTO.
Eight keys to memorize
-
CYCLE START (usually blue) - runs the program. Only click when you have checked everything.
-
FEED HOLD (usually red or yellow) - pauses the feeding motion, the spindle still rotates. Use when in doubt.
-
EMERGENCY STOP - big red button, cuts off all movement. Press as soon as there is a danger, release only when the treatment is complete.
-
RESET - cancels the running program and returns the cursor to the beginning. Not a “remove errors” button.
-
SINGLE BLOCK - run each command line one at a time, each time you press Cycle Start runs exactly one line. Required on the first run of every new program.
-
DRY RUN - run without cutting to check trajectory. Note: dry run often runs at a different speed than the programmed speed.
-
MACHINE LOCK - locks axis movement, only allowing coordinates to run on the screen to detect syntax errors.
-
FEEDRATE OVERRIDE and RAPID OVERRIDE - speed percentage adjustment knobs. The first time you run, you should lower the feed to 10–20% and the rapid to 25% to have time to react.

G-code and M-code are basic for beginners to read and understand
You don't need to be able to write the program right away, but you must be able to read it to know what the machine is about to do. G-code motion control, M-code controls auxiliary functions such as spindle and coolant.
|
Code |
Meaning |
Notes for newbies |
|
G00 |
Run fast without cutting |
The most dangerous thing is when the embryo's origin is wrong |
|
G01 |
Line interpolation with clipping |
Comes with F feed rate |
|
G02/G03 |
Circular interpolation clockwise/counterclockwise |
Usually goes with radius R or I, J |
|
G04 |
Pause from time to time |
Used when drilling holes and breaking chips |
|
G17/G18/G19 |
Select XY/XZ/YZ plane |
The default milling machine is G17 |
|
G20/G21 |
Inch/millimeter unit |
Check again before running, if you make a mistake, the knife will break immediately |
|
G28 |
About the reference point |
Usually placed at the beginning and end of the program |
|
G40/G41/G42 |
Cancel/compensate left/right tool radius |
Wrong compensation direction is wrong profile |
|
G43/G49 |
Enable/disable tool length compensation, using H number |
Forgetting G43 is a typical cause of collision |
|
G54 – G59 |
Six sets of embryonic roots |
G54 is the most commonly used |
|
G90/G91 |
Absolute/relative coordinates |
Mistaking these two codes causes the knife to run misaligned cumulatively |
|
M03/M04/M05 |
Main shaft rotates forward/reverse/stop |
Comes with S speed |
|
M06 |
Change knife |
There must be the correct number of knives in the socket |
|
M08/M09 |
Turn on/off coolant |
Check the solution level first |
|
M30 |
End the program and return to the beginning |
Without M30, the machine will hang at the end of the program |
Read a sample milling program:
O0001
G21 G17 G90 G40 G49
T01 M06
G54 G00 X0 Y0
G43 H01 Z50.
S2000 M03
M08
G00 Z5.
G01 Z-2. F100
G01 X50. F300
G00 Z50.
M09
M05
G91 G28 Z0.
M30
Explanation: set the millimeter unit and absolute coordinates, call tool number 1, take the workpiece origin G54 and run it to end.
By reading this far, you have detected most dangerous errors before the machine runs.
Detailed 9-step CNC machine operating process
Step 1 - Check before turning on the power
-
Check slide belt lubricant, hydraulic oil and coolant levels.
-
If the machine uses compressed air, confirm the compressor is running and has enough pressure (usually 5–7 bar depending on the machine).
-
Remove tools, wrenches, and dials from the machine table and work area.
-
Check that the shield door, safety switch and emergency stop button are working.
Step 2 - Start up and return to the original device
Close the main circuit breaker, turn on the machine power, then turn on the controller, wait for the system to finish booting. Release the E-stop button, switch to REF mode and return each axis to the origin - bring Z first, then X and Y to avoid the knife sweeping across the jig.
Then let the main shaft idle for 5–10 minutes at low speed and then gradually increase it so that the lubricating oil is evenly distributed. This machine warming step maintains accuracy and prolongs spindle bearing life.
Step 3 - Clean and mount the workpiece
-
Clean the machine table, vise surface, and workpiece surface; A particle of chip stuck under the workpiece is enough to deflect a few hundredths of a millimeter.
-
Check flatness, straightness and positioning pins before clamping.
-
The vise is parallel to the X axis with a dial indicator, the error should be within 0.01 mm over the entire jaw length.
-
Set the jig so that the workpiece does not move when cutting and is not in the path of a rapidly moving knife.
-
Raise the workpiece high enough for the part to be machined to limit vibration.
Step 4 - Install the knife and set the knife length offset
Insert the knives into the socket in the correct order in the program's knife list. For each tool, measure the length and enter it in the offset table.
Common manual way: place the touch setter or standard block on the machine table, lower the Z axis in HANDLE mode with steps of 0.01 mm until the tool touches the reference point, record the Z Machine coordinates and enter them in the Geom/H box of that tool. The spindle is stationary when measuring with a touch setter, base block or dial indicator. Check again using MDI mode: call G54 and then return the knife to Z0 to see if it is in the expected position.
Workshops with conditions should use automatic tool measuring equipment (BLUM, METROL, NIKKEN, MST) to be faster and eliminate subjective errors. Inputting incorrect tool length offset is the most common cause of tool collisions with new users.
Two tool offset systems, choose one and use it consistently:
This is where beginners make the most mistakes, because there are two schools of thought and mixing them will cause the Z root to be counted twice, and the knife goes deeper than the command.
|
Negative offset system (direct touch) |
Positive offset system (measured according to gauge line) |
|
|
How to measure |
Touch each knife to the workpiece surface, table surface or vise jaw |
Measure the tool length from the gauge line of the taper shank, usually with a tool measuring tool outside the machine |
|
Value in cell H |
Negative number |
Positive number |
|
Root Z in G54 |
Usually equal to 0 if touching directly on the workpiece surface |
Distance from the tool placement point to the workpiece face |
|
Suitable |
The workshop has few knives, handmade |
Workshop with many knives, with knife measuring machine or tool setter |
|
Risk |
Changing the jig means the entire offset is wrong; If you forget the negative sign, cut off the air |
Wrong number or forgotten sign is a real deal |
The controller adds these two values: the distance from the tool tip in the home position to the Z origin of the workpiece is equal to the Z offset of the fixture plus the length offset of the tool being used. Therefore, each distance is measured only once, according to exactly one system.
Step 5 - Set up the G54 workpiece root
X and Y axis: use edge finder. With mechanical rotation, let the main shaft rotate slowly and then gradually insert it into the edge of the workpiece until the probe stops rotating and suddenly deflects. With the optical type, insert slowly until the light comes on and the buzzer sounds. Record the X Machine coordinates, subtract the probe radius, then enter into table G54. Common mechanical probes have a tip of Ø5.08 mm (0.200 inch), or a radius of 2.54 mm, and are rotated at about 1,000-1,100 rpm.
Note: some controllers have the function to record the spindle center position directly into G54 (Part Zero Set). When using that method, you lift the tool off the workpiece and then rotate your hand exactly one revolution equal to the probe radius instead of subtracting the number, not both. Do the same for Y.
Z axis: there are two common ways.
-
Use a thin piece of paper to place between the knife and the workpiece surface, let the knife rotate slowly and then lower Z in steps of 0.01 mm until the paper is pulled away. The knife rotates to get the correct lowest cutting edge. This method leaves an error exactly equal to the paper thickness, about 0.05–0.13 mm, so it is only used for wide tolerance work.
-
Use a standard height indicator (eg 50 mm type): lower the knife until the needle reaches 0, subtract 50 mm from the Z Machine coordinates as the offset value.
Enter additional tool radius compensation in the corresponding box if the program uses G41/G42.
Step 6 - Load and test the program
Transfer programs to the machine via USB, RS-232 port or DNC network. Then open in EDIT mode and quickly check the following points:
-
Unit is G21 (mm) or G20 (inch).
-
Does the tool number T calls out match the tool installed in the socket?
-
Is there enough G43 with the correct H number for each knife?
-
Is the workpiece base called in the program (G54 or G55...) the correct set you just set?
-
Is the maximum cutting depth Z reasonable compared to the workpiece thickness and vise jaw height?
-
Is there an M30 command at the end.
Step 7 - Test run before actual cutting
This is the most overlooked step and also the most expensive step to skip. Do it in three layers:
-
Graphical Test or Machine Lock - run the program with the axis locked to catch syntax errors and see the trajectory on screen.
-
Run without cutting (air cut) - raise the Z stem 50-100 mm above the workpiece surface and then run it completely to check for collision with the jig.
-
Run each line (Single Block) - return the Z origin to true, turn on Single Block, lower the feed override to 10-20%, place your hand on Feed Hold and run each line until the knife enters the workpiece safely.
Step 8 - Actual processing and supervision
Close the shield door, switch to AUTO and press Cycle Start. While the machine is running, observe:
-
Cutting sounds - unusual hissing or growling noises indicate dull knives, incorrect feed or vibration.
-
Chip color and shape - green burnt chips, powdery crumbs or rolls that are too long are all signs of incorrect cutting parameters.
-
Spindle load - increasing load over time usually means the tool is wearing out.
-
Coolant flow - must hit the right cutting area, not blocked by chips.
Absolutely do not open the door, do not reach out to clean chips, and do not measure details while the main shaft is still rotating.
Step 9 - Measure, compensate and turn off the machine
-
Measure the first part with a caliper, micrometer or 3-dimensional measuring machine according to drawing requirements.
-
If the size deviation is within a small range, correct it in the wear compensation box, do not edit the program directly.
-
If it meets the requirements, run a series and periodically re-measure according to the factory's prescribed frequency.
-
At the end of the shift: remove the knife from the main shaft, return the machine table to the middle position, clean the chips, wipe off the oil, turn off the controller and then turn off the main power.
Return machines, tools and areas to the same state they were in when you received your shift.
What is the difference between operating a CNC milling machine and a CNC lathe?
The 9-step process above is the same, but some specific operations are clearly different.
|
Criteria |
CNC milling machine (VMC) |
CNC lathe |
|
Cutting motion |
The knife rotates, the workpiece stands still |
The workpiece rotates, the knife moves forward |
|
Number of basic axes |
X, Y, Z (4-5 axis expansion) |
X and Z (plus C, Y on compound lathe) |
|
How to fix the workpiece |
Motor vise, magnetic table, specialized jigs |
3-jaw chuck, collet, center support |
|
The embryonic root is usually placed |
The upper left corner or center of the workpiece, the upper surface is Z0 |
The center of the rotation axis is X0, the workpiece end face is Z0 |
|
Bu knife |
Length (H) and radius (D) compensation |
Compensate tool tip position and tool tip radius (nose R) |
|
Specific risks |
Bumping the knife into the jaw of the vise, breaking the small knife |
Workpieces fly due to lack of force in the clamp, wire chips wrap the knife |
|
Separate note |
Check the vise jaw height compared to the tool path |
Limit rotation speed (G50/G96) when turning face |
Newbies are often introduced to the milling machine first because the axis system is more intuitive, then move on to the lathe - where the workpiece rotates at high speed, so the consequences of misalignment are much more serious.
>>> Useful for you:
Detailed instructions for operating cnc milling machines for beginners
Operating a CNC lathe: Detailed process instructions from A–Z
Labor safety when operating CNC machines
Personal protective equipment is the last layer of defense, not the first. The first layer is always machine shielding and correct procedures.
Compulsory protective equipment
-
Safety glasses - splatters and coolant are the most common causes of eye injuries in mechanical workshops.
-
Steel-toed safety shoes - falling metal billet is a constant risk.
-
Earplugs or earmuffs when working near multiple machines running at the same time.
-
Cut-resistant gloves - only used when removing chips and handling workpieces. Absolutely do not wear gloves when working near the rotating spindle - gloves getting caught in the knife are much more dangerous than bare hands.
-
Neat clothes - no rings, bracelets, necklaces; Long hair must be tied neatly.
Rules while the machine is running
-
Never disable the shield door safety switch to “see clearly.”
-
Do not open the door or reach into the cutting area until the spindle has stopped completely.
-
Clear away shavings with a hook or broom, do not use your hands, or use compressed air to blow on others.
-
Only leave the computer when you know the program is stable; Absolutely do not leave a strange machine running unattended for the first time.
-
One machine, one operator - no one can press a button while another person is operating in the machine area.
When something goes wrong
Press E-stop immediately, stay calm, assess whether there is still immediate danger and then notify the person in charge. Any internal repairs to the machine must be carried out after applying energy management (LOTO - lock out and tag out the power alarm). Only an authorized person may remove the lock or tag.
Factory hygiene and environment
Oily floors, overflowing chip bins and poor lighting are hazards that are overlooked but cause the most real accidents. Empty the chip bin every day, wipe up oil spills immediately, and keep ventilation to limit cutting oil mist. Read the chemical safety data sheet (SDS) before handling or disposing of coolant.
Common errors and how to handle them
|
Error |
Signs |
Common causes |
Processing direction |
|
Over Travel |
Machine stops, OT message appears on the screen |
The axis exceeds the soft or hard limit, the workpiece origin is placed outside the area |
Hold down the limit release key, JOG the reverse axis towards the safe zone then Reset and recheck G54 |
|
Forgot to compensate for tool length |
The knife stabs straight into the workpiece or machine table |
Missing G43 or wrong H number |
Stop immediately, review each call line, re-enter the offset and run Single Block |
|
Wrong embryo origin |
Details are offset by a fixed amount |
Forgot to subtract the probe radius, or the program calls G55 but sets it to G54 |
Compare the original set of the calling program with the set you have set, reset and test the first details |
|
The size of the deviation gradually becomes smaller in series |
The first few details are correct, but later on, they become more and more skewed |
Worn knife |
Adjust the wear compensation box, set the tool change cycle according to the part number |
|
Chatter |
The surface has wave marks and squeaks |
Dull knife, long protruding knife, weak jig, inappropriate cutting parameters |
Reduce the depth of cut, shorten the tool's protrusion, increase the rigidity of the fixture, and adjust the speed and feed rate |
|
Program syntax error |
The machine alarms as soon as Cycle Start is pressed |
Wrong G-code, missing M30, wrong post processor |
Edit in EDIT or re-export from CAM with the correct post processor |
|
Alarm servo or spindle overload |
Machine stops, alarm code displays |
Eating too deep, knife stuck, hardware error |
Record the alarm code verbatim, look it up in the manufacturer's manual, do not reset continuously to continue running |
|
Program transmission error |
The machine does not receive the file or the file is cut |
Wrong USB format, loose RS-232 cable, full memory |
Format the USB according to the manufacturer's requirements, delete old programs, check the wire and transmission parameters |
|
Workpiece splashes or moves |
Sudden crashing sound, completely wrong size |
Lack of clamping force, dirty face, too heavy cutting mode |
Stop immediately, clean the bearing surface, re-jig, reduce the cutting depth of each layer |
General rule when encountering an alarm: read the error code first, press Reset later. Alarm codes are the most valuable diagnostic information your machine provides; To delete it without reading it is to ignore the only clue.
Maintenance schedules keep machines accurate for a long time
CNC machines lose accuracy gradually, not suddenly. Regular maintenance is much cheaper than a complete machine recalibration.
|
Frequency |
Work |
|
Every shift |
Check lubricating oil and coolant; chip removal; cleaning the slide and machine table; Check E-stop and shield door |
|
Every week |
Clean the filter mesh, check the coolant concentration, drain the water in the compressed air tank, and check the air pressure |
|
Monthly |
Check wires and hoses, tighten fixture bolts, check shaft play, clean knife bearings and knife clamping mechanism |
|
6 months or 1,000 hours |
Clean the coolant tank, remove the chuck and jaw to clean, and check the spindle runout |
|
Every year |
Calibrate geometric accuracy, check backlash compensation, update control software if recommended by the manufacturer |
Keeping a machine log by shift - date, operator, alarm codes encountered, tools replaced - is the cheapest way to detect failure trends early.
Self-learning course to operate CNC machines in 6 months
A practical roadmap for those starting from scratch, with verifiable goals at each stage.
|
Phase |
Stay focused |
Rated as satisfactory |
|
January |
Read drawings, tolerances, measuring tools, workshop safety |
Measure the correct size using a caliper and micrometer to 0.01 mm |
|
February |
Control panel, modes, JOG and HANDLE, back to base |
Automatically starts the machine, returns to the origin and moves the shaft safely without prompting |
|
March |
Basic G-code, read and understand available programs |
Point out which part of the program calls for knives and which part is the most ingrained |
|
April |
Set tool and workpiece offset G54 |
Independent set for 3 knives, first part meets tolerance |
|
May |
Run series, compensate for tool wear, handle normal alarms |
Maintains consistent dimensions across a series of 50 parts |
|
June |
Cutting parameters, knife selection, familiarization with CAM |
Suggested parameter changes to shorten cycle time without damaging the tool |
Fastest learning tip: keep a notebook recording every error you encounter - alarm code, cause, solution. After six months, that notebook is more valuable than any textbook.

Frequently asked questions
How long does it take to learn to operate a CNC machine?
To start a machine running a series of simple products under supervision, it usually takes 2-3 months. To set up the machine yourself, handle errors and take independent quality responsibility, it takes about 6-12 months of continuous practice.
Do newbies need to know CNC programming?
Not required at the beginning, but must read and understand basic G-code. If you can't read the program, you don't know what the machine is about to do, and that's a dangerous situation.
Why do we have to return to the base of the machine at the beginning of each shift?
Many devices cannot save the actual location after turning off the power. Returning to the base of the machine is a way for the controller to reset the reference system; If you skip this step, all subsequent coordinates will be unreliable.
What is G54 and how is it different from offset knives?
G54 is the original workpiece storage - tells the machine where the zero point of the part is located on the machine table. Tool offset is the individual parameter of each knife (length and radius). The two things are independent and must both be true.
Why do we have to test run it when it has been simulated on software?
The simulation can check the program logic but does not know how much offset you are setting the workpiece, whether the offset input is wrong, or whether the vise function is on the tool path. Run a test to check the part of the computer that cannot be seen.
What should an alarm do first?
Record the alarm code and running program verbatim before pressing anything. Then look up the code in the controller's documentation. Resetting continuously to continue running is a way to damage the device.
Should beginners start with a milling machine or a lathe?
Usually a vertical milling machine, because the X-Y-Z axis system is intuitive and the consequences of incorrect operations are lighter than a lathe, where the workpiece rotates at high speed.
Conclusion
Operating a CNC machine is not difficult in operations, but difficult in process discipline. If you follow the correct order of the 9 steps - checking, returning to the machine base, fixing the workpiece, setting the tool offset, setting the workpiece base, checking the program, testing, machining, measuring - then most of the risks disappear. Three habits worth keeping from day one: always check where the mode is, always do a test run before actually cutting it, and always read the alarm code before pressing Reset.
Need machine advice or operations training for your team?
CNC VAITECH is the exclusive distributor of HANDEMO CNC machines in Vietnam, providing CNC milling machines (VMC650, VMC850, VMC1160), CNC lathes (TCK70D, TCK6350D) and horizontal machining centers. In addition to equipment, we provide installation, factory operation training, technical support, warranty and periodic accuracy testing.
-
Hotline / Zalo: 0968 309 099 (8:00–21:00, including weekends)
-
Hanoi showroom: Cuu Quan 2, Hoai Duc, Hanoi
-
Ho Chi Minh City Showroom: Vinhomes Grand Park, Long Binh Ward
-
Website: handemocnc.vn

