G68/G69 Rotation Function
Format
- G68 X_Y_Z_R_
- G69
Description
The command can be used for rotary machining during contour machining. It makes the specified machining contour rotate degrees specified by R around the center in the specified plane.
G68 is rotation on, while G69 rotation off.
X_Y_Z_: the center of rotation.
R_: rotation angle in degree. Negative value is clockwise while positive value counterclockwise.
Eg: put a watch on the current plane, and let the watch surface towards the positive direction of the third axis; positive means counterclockwise rotation, while negative clockwise rotation.
In the process of rotation, coordinate of the third axis perpendicular to the current plane is always constant. When the watch is swiveling in XY plane, the coordinate of Z-axis remains constant; in YZ plane, the coordinate of X-axis remains constant; and in ZX plane, the coordinate of Y-axis remains constant.
Programming Example
Example 1
G17G90 X0Y0Z0
G65P9999L1
G68 X0Y0R-90 'rotate 90 degrees clockwise around the center of (0, 0)
G65P9999L1
G69 'rotation off
M30
O9999 'machine a rectangle
G91 G1 X100
Y50
X-100
Y-50
G90
M17
The actual outcome is as follows:
Example 2
These two commands can also be nested.
G68 X_Y_Z_R_ '………A
…
G68 X_Y_Z_R_ '………B
…
G68 X_Y_Z_R_ '………C
…
G69 '………C'
G69 '………B'
G69 '………A'
Rotation that appears earlier will influence the subsequent rotation command. The subsequent rotation center is not the one in the machining program, but the position will change due to the previous rotation. The actual rotation center is the position after transformation.
The function of G69 is to cancel the previous rotation command. In the program mentioned above, line C’ cancels G68 in line C, line B’ corresponds to G68 in line B, and line A’ corresponds to G68 in line A. If G69 is not used, all rotation commands will be automatically canceled at the end of current machining.
Example 3
The following example contains the nesting of rotation command and scaling command.
G90 G0 X0 Y0 Z0
G91G65 P9999 L1
G65 P9998 L10
M30
O9999
G1 X200
Y-100
X-200
Y100
M17
O9998
G68 X50 Y50 R45
G65 P9999 L1
G51 X50 Y50 P0.5
G65 P9999 L1
M17
The actual machining effect is as follows: