Pro codes · Fanuc
G10 L2 / L20 — Set a work offset from the program (Fanuc)
Set a work offset from the program. Writes a work offset from the program: G10 L2 P1–P6 for G54–G59 (P0 = external offset), G10 L20 P1–P48 for the extended offsets G54.1 P1–P48. With G90 the value is…
| Property | Value |
|---|---|
| Code | G10 L2 / L20 |
| Control | Fanuc |
| Topic | Offsets and data |
| Syntax | G90 G10 L2 P<n> X Y Z [A B] |
What it does
Writes a work offset from the program: G10 L2 P1–P6 for G54–G59 (P0 = external offset), G10 L20 P1–P48 for the extended offsets G54.1 P1–P48. With G90 the value is replaced, with G91 it is added. Used in fixture programs, pallet changers and after probing.
Example
G90 G10 L2 P1 X-312.455 Y-201.330 Z-405.120 (G54)
G90 G10 L20 P7 X-150. Y-80. Z-400. (G54.1 P7)Tips
- Write a comment with the date and the source of the numbers.
- The macro simulator lets you test G10 with the variables #5221 and following.
Careful: A wrong value moves the zero of every following part. Never write offsets from untested macros.
Options, numbers and parameters depend on the control model, the software version and the options the machine builder installed. Check the operator and parameter manual of your machine before you use a code for the first time, and run it in single block with low overrides.
Try it without a machine
The Macro B simulator runs variables, G65 calls, #3000 alarms, G10 and system variables block by block.
Open the Macro B simulatorMore: offsets and data
- G10 L10–L13 — Set tool offsets from the program (Fanuc)
- G54.1 P1–P48 — Additional work offsets (Fanuc)
- G51.1 / G50.1 — Programmable mirror image (Fanuc)
- TRANS / ATRANS / ROT — Programmable frames (Siemens)