Haas Mill G107 Cylindrical Mapping

Haas G Codes Mill Reference

G107 Cylindrical Mapping (Group 00)

X X-axis command
Y Y-axis command
Z Z-axis command
A A-axis command
Q Diameter of cylindrical surface
R Radius of rotary axis

This G code translates all programmed motion occurring in a specified linear  axis into the equivalent motion along the surface of a cylinder (as attached to a rotary axis) as shown in the following figure. It is a Group 0 G code, but its default operation is subject to Setting 56 (M30 Restores Default G). The G107 command is used to either activate or deactivate cylindrical mapping.
• Any linear-axis program can be cylindrically mapped to any rotary axis (one at a time).
• An existing linear-axis G-code program can be cylindrically mapped by inserting a G107 command at the beginning of the program.
• The radius (or diameter) of the cylindrical surface can be redefined, allowing cylindrical mapping to occur along surfaces of different diameters without having to change the program.
• The radius (or diameter) of the cylindrical surface can either be synchronized with or be independent of the rotary axis diameter(s) specified in the Settings 34 and 79.
• G107 can also be used to set the default diameter of a cylindrical surface, independently of any cylindrical mapping that may be in effect.

G107 Description

Three address codes can follow a G107: X, Y or Z; A or B; and Q or R.
X, Y, or Z: An X, Y, or Z address specifies the linear axis that will be mapped to the specified rotary axis (A or B). When one of these linear axes is specified, a rotary axis must also be specified.
A or B: An A or B address identifies which rotary axis holds the cylindrical surface.
Q or R: Q defines the diameter of the cylindrical surface, while R defines the radius. When Q or R is used, a rotary axis must also be specified. If neither Q nor R is used, then the last G107 diameter is used. If no G107 command has been issued since power-up, or if the last value specified was zero, then the diameter will be the value in Setting 34 and/or 79 for this rotary axis. When Q or R is specified, that value will become the new G107 value for the specified rotary axis.
Cylindrical mapping will also be turned off automatically whenever the G-code program ends, but only if Setting 56 is ON. Pressing the RESET key will turn off any cylindrical mapping that is currently in effect, regardless of the status of Setting 56.

1

While R is suitable for defining the radius, it is recommended that I, J and K are used for more complex G02 and G03 programming.
Example

%
O0079 (G107 TEST)
T1 M06 (.625 DIA. 2FL E.M.)
G00 G40 G49 G80 G90
G28 G91 A0
G90
G00 G54 X1.5 Y0 S5000 M03
G107 A0 Y0 R2. (IF NO R OR Q VALUE, MACHINE WILL USE VALUE IN SETTING 34)
G43 H01 Z0.25
G01 Z-0.25 F25.
G41 D01 X2. Y0.5
G03 X1.5 Y1. R0.5
G01 X-1.5
G03 X-2. Y0.5 R0.5
G01 Y-0.5
G03 X-1.5 Y-1. R0.5
G01 X1.5
G03 X2. Y-0.5 R0.5
G01 Y0.
G40 X1.5
G00 Z0.25
M09
M05
G91 G28 Z0.
G28 Y0.
G90
G107
M30
%

G107 Cylindrical Mapping