Haas Mill G47 Text Engraving

Haas G Codes Mill Reference

G47 Text Engraving (Group 00)

The Haas Control allows the operator to engrave a line of text, or sequential serial numbers, with a single G-code.

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 string 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

Literal String Engraving (G47 P0)

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. The characters available for engraving, using this method are:

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

Not all of these characters can be entered from the control. See the following Engraving Special Characters section when programming from the mill keypad, or engraving parenthesis ().
Example
This example will create the figure shown.

O00036 (TEXT TO ENGRAVE)
T1 M06
G00 G90 G98 G54 X0. Y0.
S7500 M03
G43 H01 Z0.1
G47 P0 (TEXT TO ENGRAVE) X2. Y2. I45. J0.5 R0.05 Z-0.005 F15. E10.
G00 G80 Z0.1
M05
G28 G91 Z0
M30

1
In this example:

G47 P0     Select literal string engraving
X2.0 Y2.0  Sets the starting point for the text (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       Commands the cutter to retract to 0.05 units above part, after engraving
Z-.005     Sets an engraving depth of -.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

Sequential Serial Number Engraving (G47 P1)

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.
Example
The following example will engrave 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

Setting Initial Serial Number to be Engraved

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.
Example
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 the CRNT COMDS button on the control, then press the PAGE UP and PAGE DOWN buttons as needed to display the MACRO VARIABLES page. From that screen, press the DOWN ARROW button until 599 is highlighted.
Once 599 is highlighted on the screen, type in the initial serial number to engrave, “1” for example, then press the WRITE button. 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. See the Macros section of this manual for more details.

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

Engraving Special Characters (G47 P32-126)

P values to engrave specific characters:

32   space   41     )   59     ;   93       ]
33   !       42     *   60     <   94       ^
34   “       43     +   61     =   95       _
35   #       44     ,   62     >   96       ‘
36   $       45     -   63     ?   97-122   a-z
37   %       46     .   64     @   123      {
38   &       47     /   65-90  A-Z 124      |
39   ‘       48-57  0-9 91     [   125      }
40   (       58     :   92     \   126      ~

Example
To engrave “$2.00”, from the control, two lines of code are necessary. The first uses a P36 to engrave the dollar sign ($), and the second uses P0 (2.00). Note that the axes (XY start location) needs to be shifted between the first and second line of code to make a space between the dollar sign and the 2. This is the only method for engraving parenthesis ().

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

With the Haas Control it is possible to 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.
Example
The following example will engrave a four digit serial number, along the O.D. of a Haas rotary part.

O00120 (G47 S/N with G107 Wrap)
T1 M06
M03 S7500
G54 G90 G00 G17 G40 G80
X0.1 Y0. A0. (Start Point of Engrave)
G43 H01 Z0.1
G107 A0. Y0. R1.25 (R is Radius of Part)
G47 P1 (####) X0.1 Y0. I90. J0.15 R0.05 Z-0.012 F30. E10.
G00 Z0.1 M09
G91 G28 Z0.
G90
G107 (Turn OFF Cylindrical Mapping)
M05
M30

See the G107 section for more details on this cycle.


G47 Text Engraving