G47 Text Engraving (Group 00)

Next Generation Control Mill Operator's Manual

The Online Interactive Operator's Manual is currently available in English only.

A PDF version of the Operator's Manual is available for download in multiple languages. Click the link below to view the Operator's Manual in your language. Click "Continue" to view the online version in English.

Get a translated PDF Download Continue

G47 lets you engrave a line of text, or sequential serial numbers, with a single G-code. To use G47, Settings 29 (G91 Non-Modal) and 73 (G68 Incremental Angle) must be OFF.

note: Engraving along an arc is not supported.
*E - Plunge feed rate (units/min)
F - Engraving feedrate (units/min)
*I - Angle of rotation (-360. to +360.); default is 0
*J - Height of text in in/mm (minimum = 0.001 inch); default is 1.0 inch
P - 0 for literal text engraving
- 1 for sequential serial number engraving
- 32-126 for ASCII characters
*R - Return plane
*X - X start of engraving
*Y - Y start of engraving
*Z - Depth of cut

*indicates optional

Literal Text Engraving

This method is used to engrave text on a part. The text should be in the form of a comment on the same line as the G47 command. For example, G47 P0 (TEXT TO ENGRAVE), will engrave TEXT TO ENGRAVE on the part.

note: Corner rounding can cause engraved characters to appear rounded and make them harder to read. To improve the sharpness and readability of engraved text, consider lowering the corner-rounding values with a G187 E.xxx value before the G47 command. Suggested starting E values are E0.002 (inch) or E0.05 (metric). Command a G187 alone after the engraving cycle to restore the default corner-rounding level. Refer to the example below:
G187 E.002 (PREFACE ENGRAVING WITH A G187 E.xxx) G47 P0 X.15 Y0. I0. J.15 R.1 Z-.004 F80. E40. (Engraving Text) G00 G80 Z0.1 G187 (RESTORE NORMAL CORNER ROUNDING FOR SMOOTHNESS)
note: Engraving along an arc is not supported.

The characters available for engraving are:

A-Z, a-z 0-9, and ` ~ ! @ # $ % ^ & * - _ = + [ ] { } \ | ; : ’ ” , . / < > ?

Not all of these characters can be entered from the control. When programming from the mill keypad, or engraving parenthesis (), refer to the following Engraving Special Characters section.

This example creates the figure shown.

% O60471 (G47 TEXT ENGRAVING) ; (G54 X0 Y0 is at the bottom-left of part) ; (Z0 is on top of the part) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X2. Y2. (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G47 P0 (TEXT TO ENGRAVE) X2. Y2. I45. J0.5 R0.05 Z-0.005 F15. E10. ; (Starts at X2. Y2., engraves text at 45 deg) ; (BEGIN COMPLETION BLOCKS) ; G00 G80 Z0.1 (Cancel canned cycle) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %

Engraving Program Example

In this example, G47 P0 selects literal string engraving. X2.0 Y2.0 sets the starting point for the text at the bottom left corner of first letter. I45. places the text at a positive 45° angle. J.5 sets the text height to 0.5 units-in/mm. R.05 retracts cutter to 0.05 units above part after engraving. Z-0.005 sets an engraving depth of -0.005 units. F15.0 sets an engraving, XY move, feedrate of 15 units per minute. E10.0 sets a plunge, -Z move, feedrate of 10 units per minute.

Special Characters

Engraving Special Characters involves using G47 with specific P values (G47 P32-126).

P- values to engrave specific characters

G47 P Values for Special Characters

32 space 59 ; semicolon
33 ! exclamation mark 60 < less than
34 " double quotation mark 61 = equals
35 # number sign 62 > greater than
36 $ dollar sign 63 ? question mark
37 % percent sign 64 @ at sign
38 & ampersand 65-90 A-Z capitol letters
39 closed single quote 91 [ open square bracket
40 ( open parenthesis 92 \ backslash
41 ) close parenthesis 93 ] closed square bracket
42 * asterisk 94 ^ caret
43 + plus sign 95 _ underscore
44 , comma 96 open single quote
45 - minus sign 97-122 a-z lowercase letters
46 . period 123 { open curly bracket
47 / slash 124 | vertical bar
48-57 0-9 numbers 125 } closed curly bracket
58 : colon 126 ~ tilde


To engrave $2.00, you need (2) blocks of code. The first block uses a P36 to engrave the dollar sign ($), and the second block uses P0 (2.00).

note: Shift the X/Y start location between the first and second line of code to make a space between the dollar sign and the 2.

This is the only method to engrave parenthesis ().

Engraving Sequential Serial Numbers

This method is used to engrave numbers on a series of parts with the number being increased by one each time. The # symbol is used to set the number of digits in the serial number. For example, G47 P1 (####), limits the number to four digits while (##) would limit the serial number to two digits.

note: Engraving along an arc is not supported.

This program engraves a four digit serial number.

% O00037 (SERIAL NUMBER ENGRAVING) ; T1 M06 ; G00 G90 G98 G54 X0. Y0. ; S7500 M03 ; G43 H01 Z0.1 ; G47 P1 (####) X2. Y2. I0. J0.5 R0.05 Z-0.005 F15. E10. ; G00 G80 Z0.1 ; M05 ; G28 G91 Z0 ; M30 ; %

Initial Serial Number

There are two ways to set the initial serial number to be engraved. The first requires replacing the # symbols within the parenthesis with the first number to be engraved. With this method, nothing is engraved when the G47 line is executed (it is only setting the initial serial number). Execute this once and then change the value within the parenthesis back to # symbols to engrave normally.

The following example will set the initial serial number to be engraved to 0001. Run this code once and then change (0001) to (####).

G47 P1 (0001) ;

The second method for setting the initial serial number to be engraved is to change the Macro Variable where this value is stored (Macro Variable 599). The Macros option does not need to be enabled.

Press CURRENT COMMANDS then press PAGE UP or PAGE DOWN as needed to display the MACRO VARIABLES page. From that screen, enter 599 and press Down cursor.

Once 599 is highlighted on the screen, type in the initial serial number to engrave, 1 for example, then press ENTER.

The same serial number can be engraved multiple times on the same part with the use of a macro statement. The macros option is required. A macro statement as shown below could be inserted between two G47 engraving cycles to keep the serial number from incrementing to the next number. For more details, see the Macros section of this manual.

Macro Statement: #599=[#599-1]

Engraving Around the Outside of a Rotary Part (G47, G107)

You can combine a G47 Engraving cycle with a G107 Cylindrical Mapping cycle to engrave text (or a serial number) along the outside diameter of a rotary part.

This code engraves a four digit serial number along the outer diameter of a rotary part.

% O60472 (G47 SERIAL NUMBER ENGRAVING) ; (G54 X0 Y0 is at the bottom left of the part) ; (Z0 is on top of the part) ; (BEGIN PREPARATION BLOCKS) ; T1 M06 (Select tool 1) ; G00 G90 G40 G49 G54 (Safe startup) ; G00 G54 X2. Y2. (Rapid to 1st position) ; S1000 M03 (Spindle on CW) ; G43 H01 Z0.1 (Activate tool offset 1) ; M08 (Coolant on) ; (BEGIN CUTTING BLOCKS) ; G47 P1 (####) X2. Y2. J0.5 R0.05 Z-0.005 F15. E10. ; (Engraves serial number) ; (BEGIN COMPLETION BLOCKS) ; G00 Z0.1 M09 (Rapid retract, Coolant off) ; G53 G49 Z0 M05 (Z home, Spindle off) ; G53 Y0 (Y home) ; M30 (End program) ; %

For more details on this cycle, refer to the G107 section.

Be aware: Many service and repair procedures should be done only by authorized personnel. The service technicians at your Haas Factory Outlet (HFO) have the training, experience, and are certified to do these tasks safely and correctly. You should not do machine repair or service procedures unless you are qualified and knowledgeable about the processes.

Danger: Some service procedures can be dangerous or life-threatening. DO NOT attempt a procedure that you do not completely understand. Contact your Haas Factory Outlet (HFO) and schedule a service technician visit if you have any doubts about doing a procedure.