G-CODEEIA/ISO · modal · group 23
G51.2

Polygonal machining mode ON

Machine-specific. This G-code reference is specific to the Mazak INTEGREX e-670H / e-670H-S with the MAZATROL SmoothX control (EIA/ISO programming manual H747PB0030E). G-code availability depends on fitted options, and groups and behaviour differ between Mazak models and control generations — verify against the manual for your own machine before programming with any code.
What it does

A workpiece is machined in a polygonal shape by turning the rotary tool at a constant rate to the workpiece at a given rotating speed. The shape to be machined depends on the following conditions:  The number of the edges of a rotary tool  The ratio of the rotating speed of a workpiece to that of a rotary tool Workpiece Rotary tool axis Polygonal machining has an advantage of machining polygonal workpieces in shorter time than polar coordinate interpolation. However, it has a disadvantage of not giving an accurate polygon. As a result, polygonal machining is usually used to machine bolt heads and nuts not requiring an accurate polygon. Quadrangle Octagon Machining shape by polygonal machining (hatched section)

G51.2 is modal (group 23) — it stays in effect until another code of the same group replaces it.

Programming format
Starting polygonal machining
G51.2 P_ Q_ D_;
 Give a command so that addresses P and Q provide the following:
(Address P): (Address Q) = (Workpiece rotational speed) : (Rotary tool speed)
 Command the rotational direction of rotary tool with the sign of address Q as follows.
When the sign of Q is “+”, positive direction is selected.
When the sign of Q is “–”, negative direction is selected.
 Use address D to specify the workpiece spindle to be used. The arguments D available, 1 to 4,
refer to the settings of machine parameters (BA55 to BA58) as follows:
Argument D Workpiece spindle selected
1 As set by parameter BA55
2 As set by parameter BA56
3 As set by parameter BA57 […]
Source

Mazak PROGRAMMING MANUAL for EIA/ISO PROGRAM, manual H747PB0030E, section 20-1 Polygonal Machining ON/OFF: G51.2/G50.2, p. 3-11, 20-1, 20-2, 20-3, 20-4, 20-5. Reference and explanation only — not a reproduction of the manual.

Not sure how to use it? Ask the Mazatrol assistant →