Operating a Fanuc CNC milling machine includes 8 fixed steps, from preparing at the beginning of the shift to shutting down the machine at the end of the shift. The three steps that cause tool stabbing the most are tool length offset, workpiece origin input, and the first run of the program. The Fanuc control system uses six working modes - EDIT, MEM, MDI, JOG, HANDLE and REF - and almost every incorrect operation comes from being in the wrong mode. Understanding these six modes correctly is half of learning how to operate.
In this article CNC will share all 8 steps with safety warnings placed right at each step, common error code groups and labor safety training regulations in effect in Vietnam. All operations have reference sources in the table at the end of the article.
Is operating a Fanuc CNC milling machine difficult?
Basic level operations are learned in a few weeks; Operating safely and achieving tolerances is the work of many months. The difficult part is not in the number of buttons, but in understanding what mode the machine is in and where the next command will take the knife.
The Fanuc interface has been around for a long time because there are few changes between generations. Technicians who have been familiar with Fanuc controls for a lifetime and switch to another generation usually only need to re-familiarize themselves with the soft key names, without having to re-learn the principles.
6 working modes on Fanuc control system
|
Mode |
Function |
Note |
|
REF (ZRN) |
Return the axes to the machine reference point after turning on the power |
If it is not back to standard, the machine cannot check the travel limit |
|
JOG |
Move the axis continuously with the button |
High speed makes it easy to stab the knife into the jig |
|
HANDLE |
Move the shaft by hand crank, small steps |
Setting the wrong step scale (×1 / ×10 / ×100) causes the axis to run too far |
|
MDI |
Enter and run a few command lines directly |
The manual input command runs immediately when CYCLE START is pressed |
|
MEM (AUTO) |
Run the program stored in memory |
Running the wrong program that is set as the main program |
|
EDIT |
Prepare, edit and simulate programs |
Fixing a running program that leads to unexpected results |
For the Fanuc system, it is clearly stated not to edit, insert or delete commands in a machining program while that program is in use. If you want to fix it, stop it completely, fix it, then run it again from the beginning or from a determined restart point.

Which group of safety training do CNC milling machine operators need?
CNC milling machine not included in the list of machines and equipment with strict requirements on occupational safety and hygiene issued together Circular 36/2019/TT-BLDTBXH. This category includes boilers, pressure vessels, lifting equipment, elevators, construction equipment and some specific groups - no machine tools.
The list of 32 jobs with strict requirements according to Circular 06/2020/TT-BLDTBXH also does not mention operating machine tools; The machines mentioned by name are mainly construction equipment, according to Newsletter dated September 8, 2020 of the Government Electronic Newspaper. Therefore, regular CNC milling machine operators belong to group 4 according to Article 17 Decree 44/2016/ND-CP, not group 3.
Three obligations come with group 4 according to Article 21 of Decree 44/2016:
-
Regular training at least once a year, duration equal to 50% of initial training time.
-
Retraining when the business changes work, equipment or technology - this applies as soon as the workshop receives a new CNC milling machine.
-
Re-training when employees leave work for more than 6 months and then return to work.
Legal note: grouping depends on the specific job description of each position. If the operator does additional work in the strict category - for example, operating a crane or forklift to handle heavy workpieces - the position moves to group 3 with an initial training period of at least 24 hours. Enterprises need to compare the full text of the above two circulars with their job description.
Instructions for operating Fanuc CNC milling machine in 8 steps
The names of hard keys, soft keys and M codes vary between controller models and between manufacturers. The procedure below describes the general procedure and does not replace the manual that came with the machine.
Step 1: Prepare before starting the shift
Adequate preparation before turning on the power shortens setup time and eliminates most execution errors. Six things to do:
-
Read detailed drawings, determine tightest tolerances and measurement standards.
-
Check the technology sheet: tool list, tool number, spindle speed and tool feed.
-
Check coolant level, lubricating oil level and compressed air pressure.
-
Clean up workpieces in the machine room, especially workpieces stuck on the table and in the spindle taper hole.
-
Check that the engine room door opens and closes normally and that the interlock switch is still effective.
-
Check that the emergency stop button can be released and is not covered by obstacles.
Warning: do not operate the machine with the door interlock switch disabled. The ISO 16090-1:2022 standard on machining center and milling machine safety cites ISO 14119 for interlocking devices and ISO 14120 for shielding — which is the final layer of protection between the operator and the rotating tool.
Step 2: Start the machine and return to the standard point
After turning on the power, the first thing that is required is to bring the axes to the machine reference point. The Fanuc manual states that this operation must be performed after power is applied, and that the travel limit check function does not operate until the shaft has returned to normal.
Commonly used sequence:
-
Turn on the main circuit breaker, turn on the power button on the control panel, wait for the screen to finish booting up.
-
Turn and release the emergency stop button, press the power supply button for the servo system.
-
Switch to REF mode, set the Z axis to standard first, then X and Y.
-
Run the machine manufacturer's spindle warming program before machining.
It is necessary to return the Z axis to standard first because the tool in a low position will hit the fixture when X or Y moves. Heating time is about 10–15 minutes depending on the machine
Warning: when stopping the engine, the Fanuc manual requires using the emergency stop button, not the RESET key. The RESET key only stops the running program, it does not guarantee stopping motion.
Step 3: Choose and mount cutting tools
Each tool must be assigned the correct T number that matches the number in the program. The tool change command on the Fanuc system has the form T01 M06 - call tool number 1 and perform tool change.
Four things when setting a knife:
-
Clean the clamp head taper and spindle taper hole before each installation.
-
Tighten the knife to the clamp head with the torque wrench on the fixture, do not tighten on the machine.
-
Keep the knife protrusion length as short as possible while still providing sufficient depth of cut.
-
Load the tool into the correct slot on the tool station and compare it with the tool table on the screen.
Warning: do not put your hand into the instrument radio area when the device is in MEM or MDI mode. One M06 command left in the buffer is enough to cause the radio to rotate unexpectedly.
Step 4: Offset the tool length with G43 H
Offsetting the tool length tells the machine how long each tool is compared to the standard, so that the same Z command gives the same depth of cut for all tools. The call has the form G0 G43 H1 Z100.0 - where H1 points to offset line number 1.
How to do this when you have an external tool measuring machine (pre-setter):
-
Measure the knife length on the measuring machine.
-
On the screen, open the TOOL OFFSET soft key.
-
Enter the measured value into the correct offset number, in the tool length geometry column.
-
Check that the number H in the program matches the line you just entered.
When the workshop does not have an external tool measuring machine, the common way is to trace each tool down to a fixed reference surface - the machine table surface or the reference block surface - and then record the machine coordinates of the Z axis at the touching point. The difference between the tools is the length difference to be entered. This method is slower and has to be done again each time the knife is changed, but does not require investment in equipment.
Note the two separate columns: the geometry column records the tool length, the wear column records the amount of compensation when the tool gradually wears. Entering the wrong column is a very common error and the consequences are identical to entering the wrong length.
The safety command at the beginning of the program usually contains G40 G80 G49 to cancel radius compensation, cancel drilling cycle and cancel tool length compensation left over from the previous run. Missing this line is one of the most common causes of stabbings.
Warning: after entering a new offset, always verify with a G43 H__ Z command at a safe altitude in MDI mode before running the program. The command in MDI runs immediately when CYCLE START is pressed, so each character must be read again before pressing.
Step 5: Set the workpiece and import the original G54
Setting the workpiece is telling the machine where the origin of the part is located on the machine table. The Fanuc system stores six workpieces from G54 to G59, allowing multiple parts to be mounted on the same table.
Important warning: there are two mutually exclusive methods of setting Z, and only one should be chosen.
-
Method A: do not use tool length offset, the Z origin of G54 also carries the tool length, then enter 0 in the Target box.
-
Method B: entered the length of each tool in Step 4, then in the Target box, enter the correct length value for that tool. To do both is to double the knife length and insert the knife into the workpiece exactly equal to the knife length. The workshop runs many tools on one part, so method B is chosen and unified for the entire workshop.
Enter the Z origin according to the Fanuc manual:
-
Switch to HANDLE mode, turn the handle so that the knife touches the top of the workpiece.
-
Press the WORKPIECE COORDINATES soft key.
-
Place the cursor in the Z-axis cell of the origin to be entered, for example G54.
-
Press the Measure soft key.
-
Enter a value in the Target box — enter 0 if tool length offset is not being used, or enter the exact saved tool length if offset is being used.
-
Click OK and check the value in the updated Result box.
Enter the X and Y origins by checking the edge: do the same, but in the Target box enter the tool radius. The Fanuc manual conventionally enters a negative value when touched from the −X side and a positive value when touched from the +X side; The Y axis follows the same sign rule.
Mistaking the tool radius mark causes the root to deviate exactly equal to the tool diameter, with a 10 mm diameter milling cutter the deviation is 10 mm. This is an error large enough to destroy the workpiece right at the first cut.
Warning: the Fanuc manual states that manual intervention, machine lock and mirror functions can all translate the workpiece coordinate system. After all operations of this type, the workpiece origin must be checked again before continuing.

Step 6: Download the CNC program to the machine
The program can be typed directly in EDIT mode or copied from USB or memory card. Procedure for copying from USB:
-
Press the PROG manager soft key.
-
Select USB or Memory card.
-
Place the cursor on the program you want to retrieve, press the Copy soft key.
-
Select the destination folder CNC_MEM or HDD_SSD.
-
Press the Paste soft key.
After copying, you must set that program as the main program: go to PROG MANAGER, place the cursor, click MAIN setting, select YES, then check the check mark appearing before the program name. If you skip this step, the machine will run the program set from the previous batch.
Before running, reread three things in the program: the original workpiece number (G54-G59), the H number of each tool, and the safety command line at the beginning of the program.
Step 7: Run the CNC program safely
The first run of a new program never runs at 100% speed. Sequence of four test layers:
-
Simulate the toolpath in EDIT mode to see the overall shape.
-
Dry run to check for collisions.
-
Run each line (single block) for the first cut of each knife, hand placed on the feed hold button.
-
Reduce override both the amount of feed and the speed to a low level, gradually increasing when it is stable.
Warning about dry run: When running a dry run, the machine runs at the dry run speed, not according to the programmed feed rate, and this speed may be higher than the programmed feed rate. Dry running with the workpiece and knife still on the machine is a dangerous operation.
Safety function warning: The feed hold, feedrate override and single block functions can be disabled using macro system variable #3004. If the program is written by someone else, do not assume that these three functions always work, check first.
When restarting midway after an incident, do not press CYCLE START on the stopped line. Use the line number search function (N SEARCH) or the control system's reset function, and recheck the spindle and coolant status in MDI mode before continuing.
Step 8: Turn off the machine properly
Shutting down the machine in the correct order helps maintain accuracy and shorten preparation time for the next shift. Six things at the end of the shift:
-
Wait for the program to end with M30, do not cut off the power midway.
-
Raise the Z axis high and bring the table to a convenient position for cleaning.
-
Remove parts, clean the workpiece in the machine room and on the workpiece conveyor.
-
Dry the machine table surface and apply anti-rust layer if the workshop is humid.
-
Record shift log: number of details, tools changed, warnings encountered.
-
Press the emergency stop button, turn off the control power, then turn off the main circuit breaker.
Warning: do not cut off the main circuit breaker until the screen is completely turned off. A sudden power cut while the control system is writing data may damage the stored program and offset table.
Common Fanuc error code groups and how to handle them

The Fanuc system classifies alarm codes by letter prefix, and the prefix immediately indicates whether the problem is in the program, the shaft or the hardware. Reading the prefix correctly shortens machine downtime significantly.
|
Prefix |
Error group |
First course of action |
|
PS |
Program and operation errors |
Read the stopped command line; Usually due to syntax or out-of-range values |
|
OT |
Exceeded travel limit |
Let the axis run back to the safe area and then reset; Check the embryo's origin |
|
SV |
Servo system error |
Serious — stop the machine, call technical staff, do not reset again |
|
SP |
Main shaft error |
Check load, programmed speed and spindle cooling status |
|
OH |
Overheating |
Check fans, electrical cabinet air filters and workshop temperature |
|
SW |
Error writing parameters |
Turn off parameter write mode and then reset |
|
PW |
Requires power off |
Turn the power off and on again for the new parameter to take effect |
|
BG |
Background editor error |
Close background editing mode and try again |
|
DS |
Other errors |
Look up the specific code in the alarm category of the manual |
General rule when encountering warnings: take a screenshot of the error code before resetting. The error code disappears after reset, and it is often the only information that helps a technician remotely diagnose the problem.
Repeated SV and SP group codes are a sign of developing hardware damage. Resetting to continue running in this case usually changes a small repair into a cluster change.
>> Useful for you: FANUC CNC machine repair: Common errors, causes and solutions
7 notes when using Fanuc CNC milling machine
The seven notes below are true for all Fanuc controller models and all CNC milling machine configurations.
-
Never disable the door interlock switch. Some factories insert objects into the switch to run when the door is opened for easy observation. This is the direct cause of most serious accidents on milling machines.
-
One person on the machine at a time. Two people operating on the same control panel leads to a situation where one person presses CYCLE START while the other person is in the engine room.
-
Do not assume that safety functions are always active. Feed hold, override and single block can be disabled by the program. Test first with unfamiliar programs.
-
Re-compare the embryo base after any manual intervention. Manual operation, machine locking and symmetry can all translate the workpiece coordinate system.
-
Save backup copies of machine parameters and offset tables. Lost parameter files turn a small fix into days of downtime. Save after each significant correction.
-
Clean the spindle taper hole according to schedule. Workpiece stuck in the taper hole causes wrong concentricity and damages the taper face — the cost of re-grinding the spindle is many times higher than cleaning.
-
Log alerts by date. An SP code appearing sporadically three times in a month is valuable diagnostic information, but only if someone records it.
As for built-in safety, the FANUC Series 0i-MODEL F control system has a Dual Check Safety option that achieves performance level PL d according to ISO 13849-1, using dual monitoring and two power cuts for the servo amplifier and spindle. This is an item you should ask clearly when ordering a new machine, because adding it later is much more expensive.

Frequently asked questions when operating Fanuc CNC milling machines
How long does it take to learn to operate a Fanuc CNC milling machine?
The basic level of operation, turning on the machine, adjusting it, setting the tool, running the available program can be learned in a few weeks by someone with a mechanical background. The level of self-setting the machine, handling alarms and keeping tight tolerances requires many months of practical work.
Are CNC milling machine operators required to have labor safety training?
Yes. CNC milling machine operators normally belong to group 4 according to Decree 44/2016/ND-CP and must undergo periodic training at least once a year. Businesses also have to retrain when changing jobs, equipment or technology.
Why must the machine return to the standard point after turning on the power?
Because the control system needs a baseline to know where each axis is. The Fanuc manual states that the travel limit check function is not active until the shaft has returned to standard, so skipping this step is running the machine without travel protection.
How are G54 and G43 different?
G54 is the workpiece origin that tells the machine where the part is on the table. G43 is the tool length compensation that tells the machine how long the tool is being used. The two things are independent and both must be true for the depth of cut to be correct.
Should dry run be used to test the program while the workpiece is still on the table?
Shouldn't. The Fanuc manual states that when dry run, the machine runs at the dry run speed and not at the programmed feed rate, and that speed can be higher. Please remove the workpiece or lower the table before dry run.
Is the Fanuc 0i-MF control system still in production?
No. FANUC America clearly notes that 0i-MF is an older generation product that has been discontinued. New machines often use the successor in the same 0i-F series, so when ordering, you need to ask clearly about the specific controller model and spare parts support period.
Conclusion
Safe operation of a Fanuc CNC milling machine is based on three habits: always know what mode the machine is in, always verify the offset and origin of the workpiece before the first pass, and always lower the speed on the first cut of each tool.
The documentation that comes with the device always trumps any general instructions. Key names, individual M codes and spindle heating programs vary between control generations, and only the manual of the machine itself is absolutely correct.
Need advice on CNC milling machine configuration suitable for the type of part being processed, or need factory operation training, please send detailed drawings and expected output for direct consultation.
CNC Vaitech
Address: No. 32, Alley 24, Cuu Quan 2 Street, Cuu Quan, Hoai Duc, Hanoi
Phone: 0968309099
Website: https://handemocnc.vn/

