G47 is one of the most useful engraving cycles on Haas and some Fanuc-based CNC machines. It allows the machine to engrave text, serial numbers, date codes, part IDs, lot numbers, and alphanumeric strings directly onto the workpiece without requiring CAM software. G47 supports both static text and automatically incrementing serial numbers, making it essential for aerospace, medical, automotive, firearm manufacturing, and any industry requiring traceability. The cycle produces clean, consistent engraving and dramatically simplifies marking operations.
1. What G47 Actually Does
G47 engraves characters using CNC-controlled motion along predefined vector shapes.
It can engrave:
- Letters (A–Z)
- Numbers (0–9)
- Symbols (- / . _ etc.)
- Serial numbers
- Automatically incrementing values
- Single lines or multiple lines
G47 is used both for part identification and aesthetic engraving.
2. Basic Syntax (Haas Standard)
G47 P# X# Y# I# J# R# Q# (Text)
Where:
- P → Engraving mode
- X/Y → Text position
- I/J → Character height & spacing
- R → Rotation angle
- Q → Mirror/flip options
- Text → String inside quotes
Example:
G47 P1 X50. Y30. I8. J6. R0. “PART-2025”
Engraves the text “PART-2025” at the programmed location.
3. Real Engraving Example – Static Text
G47 P1 X25. Y40. I6. J5. R0. “BATCH-A01”
This engraves 6 mm high characters with 5 mm spacing.
4. Engraving at an Angle (Rotated Text)
To engrave at 45°:
G47 P1 X40. Y20. I6. J5. R45. “VALVE-LEFT”
The machine automatically rotates the text.
5. Automatic Serial Number Engraving (P2 Mode)
One of the most powerful features is incrementing serial numbers.
Example:
G47 P2 X60. Y25. I6. J5. R0. “SN-0001”
After each cycle, the machine automatically advances to:
SN-0002
SN-0003
SN-0004 …
Perfect for:
- Firearm frames
- Aerospace parts
- Medical device serialization
- Automotive VIN plates
- Production batches
6. Multi-Line Engraving Example
You can engrave multiple lines by calling G47 multiple times:
G47 P1 X20. Y50. I5. J4. R0. “MODEL: XR7”
G47 P1 X20. Y42. I5. J4. R0. “ID: 98214”
G47 P1 X20. Y34. I5. J4. R0. “DATE: 2025-02”
Each line is independently positioned.
7. Deep Engraving for Coatings / Hard Materials
For harder materials or deeper engraving:
- Run multiple passes
- Lower feed
- Increase spindle speed
- Use coated small endmills (Ø0.4–2.0 mm)
Example:
G47 P1 X35. Y35. I5. J4. R0. “HH-02” F200
(Repeat 2–3 times)
8. Coordinate Transformation with G68 + G47
For engraving on angled surfaces:
G68 X0 Y0 R-30.
G47 P1 X40. Y25. I5. J5. “STATION-03”
G69
This rotates the coordinate system before engraving.
9. Common Problems and Solutions
Text too small / too large:
– Adjust I and J values
Characters distorted:
– Incorrect rotation R
– Using extremely small cutters with too high feed
Engraving off the part:
– Wrong X/Y origin
– Work offset not set correctly
Serial number not incrementing:
– P1 used instead of P2
– Memory lock or settings issue
10. Summary
G47 is an essential engraving cycle for modern CNC machining. It eliminates the need for CAM-generated engraving toolpaths, supports automatic serial numbers, enables marking at any angle, and provides clean, precise text in a production environment. For 2025 manufacturing standards where traceability and branding are critical, mastering G47 is a major advantage for any CNC programmer.
Leave a comment