Tool Offset Variables
Offset Memory Types
Fanuc has three offset memory configurations, set by the machine builder. The type determines how tool length and diameter offsets are stored and which system variable ranges are used.
| Type | Structure | Length Variables | Diameter Variables |
|---|---|---|---|
| A | One combined value per offset number (no geometry/wear, no H/D split) | #10001-#10999 (alias #2001-#2200) | Same registers — H and D read the one value |
| B | Geometry + Wear separate, but one set shared by H and D | Geometry #11001-#11999 (alias #2201-#2400), Wear #10001-#10999 (alias #2001-#2200) | Same registers as length |
| C | H-code (length) + D-code (radius) independent, each with geometry + wear | Geometry #11001-#11999 (alias #2201-#2400), Wear #10001-#10999 (alias #2001-#2200) | Geometry #13001-#13999, Wear #12001-#12999 |
Most modern machining centers use Type C (independent H length and D radius, each split into geometry and wear) — it is the configuration the variable tables below assume. Note that the four-digit #2001/#2201 numbers are aliases covering the first 200 offsets only; the five-digit numbers cover offsets 1–999 on every memory type. Lathe (T-series) controls use a different map entirely — per-axis X/Z/Y offsets plus tool-nose radius and virtual tip direction (X #2001+/#10001+, Z #2101+/#11001+, nose radius #2201+/#12001+, tip direction #2301+/#13001+).
Tool Length Offset Variables (Type C)
| Variable Range | Function | Example |
|---|---|---|
#10001-#10999 | Tool length WEAR | #10001 = offset 1 (H1) length wear |
#11001-#11999 | Tool length GEOMETRY | #11001 = offset 1 (H1) length geometry |
Variable number = base + offset number. Reading example: #100=#11001 reads offset 1 length geometry. Writing example: #11005=125.003 sets offset 5 length geometry to 125.003.
Tool Diameter Offset Variables (Type C)
| Variable Range | Function | Example |
|---|---|---|
#12001-#12999 | Tool diameter/radius WEAR | #12001 = offset 1 (D1) radius wear |
#13001-#13999 | Tool diameter/radius GEOMETRY | #13001 = offset 1 (D1) radius geometry |
Same base + offset number pattern as tool length offsets. One parameter gotcha from the manuals: bit 3 (V15) of parameter 6000 switches the whole map to FS15-style numbering, which swaps the geometry/wear assignment of these blocks (and, with bit 5 (D15) of parameter 6004 on 30i, additionally maps D-code offsets at #2401-#2800). If a macro written for one machine puts wear values where geometry should go on another, check V15 first — then confirm by writing a known value from MDI and reading it back.
Reading and Writing Offsets
Read current tool length: #100=#11001 (tool 1 geometry). Adjust wear: #10001=#10001+0.001 (add 0.001 to tool 1 wear). Use indirect access for the current tool: #100=#[11000+#4120] where #4120 = current T number.
CAUTION: Writing to geometry offsets during a program can cause unexpected tool length compensation changes if G43 is active.
Practical Examples
Tool Breakage Detection
(COMPARE TOOL LENGTH TO EXPECTED)
#100=#[11000+#4120] (CURRENT TOOL GEOMETRY)
IF [ABS[#100-#500] GT 1.0] THEN #3000=200(TOOL LENGTH ERROR)
Automated Wear Update
(MEASURED VALUE IN #500, NOMINAL IN #501)
#100=#500-#501 (DEVIATION)
#[10000+#4120]=#[10000+#4120]+#100 (ADD TO WEAR)
Copy Offsets Between Tools
(COPY TOOL 5 OFFSETS TO TOOL 15)
#11015=#11005 (LENGTH GEOMETRY)
#10015=#10005 (LENGTH WEAR)
#13015=#13005 (DIA GEOMETRY)
#12015=#12005 (DIA WEAR)
See also: Fanuc System Variables for the complete variable reference, and Modal & Position Data for position and work offset variables.
▶ Open the Macro Playground — write and run macros like these in your browser, with live variable values as the program executes.
References
- FANUC, Series 30i/31i/32i-MODEL B Plus Operator’s Manual (Common), B-64724EN/01, Ch. 16 “Custom Macro” (tool compensation memory A/B/C system-variable tables).
- FANUC, Series 30i/31i/32i-MODEL A User’s Manual (Common), B-63944EN/03, Ch. 16 “Custom Macro”.
- FANUC, Series 16i/18i/160i/180i-MODEL B Operator’s Manual (Machining Center), B-63534EN/02, Ch. 15 “Custom Macro”.
- FANUC, Series 0i-MODEL B Operator’s Manual (Machining Center), B-63844EN/02, Ch. 15 “Custom Macro”.
- Peter Smid, Fanuc CNC Custom Macros, Industrial Press, 2004.
Have a question or want to contribute?
Contact us with corrections, additions, or topics you'd like covered.
Get in Touch