CoupeFab

Machine control · Fanuc

Fanuc CNC control: work offsets, tool offsets, program format and a surprise-free post

Fanuc series (0i-F Plus, 30i-B Plus), program format, G54–G59 and additional work offsets, G10, tool offsets and what to check before running a program written for another machine.

Reviewed 4 min read Level : Intermediate DraftWritten by CoupeFab from the official documents cited. Technical review by Michaël Brassard pending.

Fanuc controls a large share of industrial CNC mills and lathes. The Fanuc dialect is the reference many other controls follow (Haas, LinuxCNC and several Asian controls share most of it), but every machine builder enables its own options and parameters. This guide gives the method; your machine’s manual always has the final word.

Common series

SeriesPositioning (per FANUC America)
0i-F Plus“General applications” control, customizable functions, everyday milling and turning
30i / 31i / 32i-B PlusAdvanced machining: high speed, multi-axis and multi-path, 5-axis machines

Program format

ElementRole
%Tape start and end (transfer)
O1234Program number
(COMMENT)Comments in parentheses
N10Block number (optional)
M30Program end and rewind

A careful header puts the control in a known state: plane, units, compensation and canned cycle cancelled, absolute mode.

%
O1001 (BRACKET - OP10)
G17 G21 G40 G49 G80 G90
T1 M06
G54 G00 X0. Y0. S2500 M03
G43 H01 Z50. M08
...
M30
%

Work offsets

  1. G54 to G59: six standard offsets, set on the offset page or by program.
  2. Additional offsets: G54.1 P1… with FANUC’s “48 additional work offsets” option you get G54.1 P1 to P48 on top of G54–G59; a separate option raises the total to 300 sets (P1–P300) on some series. Check which options your machine actually has (parameter screen or the machine builder’s spec sheet).
  3. Writing by program: G10 L2 P1 writes G54; G10 L20 P1 writes additional offset P1. In G90 the value replaces; in G91 it adds.
  4. Check: display the absolute position on a known point of the part before the first cycle.

Tool offsets

  • Length: G43 H.. applies the length; G49 cancels it. Shop habit: H = tool number.
  • Radius: G41/G42 D..; the D register holds the radius (or wear only if the post outputs the compensated path — pick one convention and stick to it).
  • Wear: adjust wear, not geometry, to correct a size in production.

Macros

Custom macros (often called Macro B) add variables (#1…, #100…, #500…), math and conditional jumps. They are used for probing, part families and counters. Variables #500 and up are usually retained at power-off: document the ones you use.

Error codes and alarms

Codes taken only from public manuals and official documents, with the source under each table. Exact numbers and meanings can vary with software version and machine builder: when in doubt, your machine’s manual wins.

FANUC — FANUC Alpha i amplifiers (7-segment display) 9

These codes show on the amplifier’s display inside the cabinet, not on the control screen. Control alarms (PS, SV, OT, SR…) are in your model’s maintenance manual (e.g. 0i-F: B-64605EN); FANUC does not publish it openly, so we do not reproduce them.

FANUC — FANUC Alpha i amplifiers (7-segment display)
CodeMeaningWhat to check
1 (servo)Alarme 1 — amplificateur servoServo amplifier internal cooling fan failure.Fan diagnostics, inspection, replacement.
2 (alimentation)Alarme 2 — module d’alimentationPower supply internal cooling fan failure.Inspect and replace the fan.
5Alarme 5 — amplificateur servoLow DC link voltage.Check the power supply, measure voltages, isolate the fault (qualified staff).
8. / 9. / A.Alarme 8., 9. ou A. — amplificateur servoIPM power module overheating.Check cooling and axis load.
FAlarme F — amplificateur servoExternal cooling fan failure.Inspect and replace the external fan.
U / LAlarme U ou L — amplificateur servoCommunication error on the FSSB fibre-optic network.Check fibre cables, connectors and amplifier communication.
56 (broche)Alarme 56 — amplificateur de brocheSpindle amplifier internal cooling fan failure.Inspect and replace the fan.
88 (broche)Alarme 88 — amplificateur de brocheSpindle amplifier external cooling fan failure.Inspect and replace the fan.
BATBAT (commande)Memory backup battery low: risk of losing SRAM data (parameters, programs, offsets).Back up data, then replace the battery per FANUC’s procedure.

Source: FANUC America — CNC Tech Tips (alarmes d’amplificateurs Alpha i, batterie) · consulted November 26, 2026

Search a code across all brands →

Common mistakes

  • Assuming a program from another Fanuc machine will run as is: builder M-codes and cycles differ.
  • Dropping the decimal point: depending on a parameter, X10 may be read as 10 mm or 0.010 mm. A Fanuc post should always write X10..
  • Leaving G41/G42 active at the end of a contour.
  • Editing tool geometry instead of wear, then losing the reference.

Checklist before running an outside program

  • Control series and options known (additional offsets, macros, cycles)
  • Post configured for this machine (tool change, coolant M-codes, drilling cycles)
  • G20/G21 units consistent with the offsets that were set
  • Offset called = offset set; tool lengths current
  • First run in single block, reduced feed, safe Z checked

FAQ

Will my Haas program run on a Fanuc?

The basics (G0/G1/G2/G3, G54, G43, G81–G83 cycles) are close, but M-codes, special cycles and extended offsets differ (Haas G154, Fanuc G54.1). Re-post with the right post instead of hand-editing.

Where do I get the manual?

From the machine builder or dealer: the original Fanuc manual plus the builder’s own documents (M-codes, cycles, options).

Should I use G10 in production?

Yes for part families or multiple fixtures, as long as it is controlled: absolute mode, a clear comment and simulation.

Sources

Spotted an error or want something added? Tell us →

One guide a week, French-first

New guides, used equipment in Quebec and price moves. No third-party ads.

CASL compliance: the box is not pre-checked. Nothing is sent without this express consent.