G-code reference
G51.1 G-Code: Programmable Mirror Image
Programmable Mirror Image — Mirrors the following moves about the given axis line(s), so left- and right-hand parts can be cut from one program.
| Property | Value |
|---|---|
| Code | G51.1 |
| Function | Programmable Mirror Image |
| Modal group | 22 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Milling machines |
| Syntax | G51.1 X_ Y_ |
What does G51.1 do?
Mirrors the following moves about the given axis line(s), so left- and right-hand parts can be cut from one program.
G51.1 is modal: once programmed it remains in effect for the following blocks until another code from modal group 22 replaces it or the control is reset.
Syntax and parameters
G51.1 X_ Y_| Address | Meaning |
|---|---|
X | Mirror about this X line |
Y | Mirror about this Y line |
G51.1 example program
G51.1 X0
M98 P1000 (left-hand part)
G50.1 X0▶ Open this example in the G-code viewer
Tips and common mistakes
- Haas uses G101 (on) and G100 (off).
Controller compatibility
G51.1 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.