Haas Mill · G-code
G47 Text Engraving
Engraves text or an auto-incrementing serial number from a single program line.
What G47 does on a Haas mill
G47 engraves the text inside the parentheses along a straight line, starting at X/Y. P0 engraves the literal text; P1 engraves a sequential serial number that increments each time the program runs.
Height (J), angle (I), plunge feed (E), cutting feed (F), depth (Z) and return plane (R) are all set in the same block, so part numbers and date codes take one line.
G47 format
| Address | Meaning |
|---|---|
P | P0 literal text, P1 sequential serial number |
X Y | Start of the text |
I | Angle of the text |
J | Character height |
Z | Engrave depth |
R | Return plane |
E | Plunge feed |
F | Engrave feed |
G47 example program
G47 P0 X0.5 Y0.5 I0. J0.15 R0.05 Z-0.005 F15. E5. (LOT 1047)⚠ Watch out
Text height J is the height of a capital letter. Engraving depth that looks small on screen can still be too deep for a fine-pointed engraving tool — a 60° tool gets wider fast.
Related codes
G47 questions
Can G47 engrave serial numbers?
Yes. Use P1 and the control increments the serial number every time the cycle runs.
Independent reference. Not affiliated with, sponsored by or endorsed by Haas Automation, Inc. Haas is a trademark of its respective owner. Always confirm codes against your machine's operator manual — options and settings vary by model and software version.