
PROGRAMMING
13. FUNCTIONS TO SIMPLIFY
PROGRAMMING
B–63524EN/01
212
In the N1 block, specify the center, direction of the axis of rotation, and
angular displacement of the first rotation. When this block is executed,
the center of the original coordinate system is shifted to (x
1
, y
1
, z
1
), then
rotated around the vector (i
1
, j
1
, k
1
) by angular displacement
α
. The new
coordinate system is called X’Y’Z’. In the N2 block, specify the center,
direction of the axis of rotation, and angular displacement of the second
rotation. In the N2 block, specify coordinates and the angle with the
coordinate system formed after the N1 block in Xp, Yp, Zp, I, J, K, and
R. When the N2 block is executed, the X’Y’Z’ coordinate system is
shifted to (x
2
, y
2
, z
2
), then rotated around the vector (i
2
, j
2
, k
2
) by angular
displacement
β
. The newest coordinate system is called X’’Y’’Z’’. In the
subsequent N3 block, coordinates in the X’’Y’’Z’’ coordinate system are
specified with Xp, Yp, and Zp. The X’’Y’’Z’’ coordinate system is called
the program coordinate system.
If (Xp, Yp, Zp) is not specified in the N2 block, (Xp, Yp, Zp) in the N1
block is assumed to be the center of the second rotation (the N1 and N2
blocks have a common center of rotation). If the coordinate system is to
be rotated only once, the N2 block need not be specified.
y
Example) G68.1 Xx
0
Yy
0
Zz
0
I0 J0 K1 Rα ;
G68.1 I1 J0 K0 Rβ ;
Z
Y
X
O(x
0
,y
0
,z
0
)
Z"
Z’
Y"
Y’
α
P (x, y, z)
z
β
β
X, Y, Z : Workpiece coordinate system
X’, Y’, Z’: Coordinate system formed after the first conversion
X”, Y”, Z” : Coordinate system formed after the second conversion
α : Angular displacement of the first rotation
β : Angular displacement of the second rotation
O (x
0
, y
0
, z
0
): Center of rotation
P (x, y, z) : Coordinates in the X’’Y’’Z’’ coordinate system (program
coordinate system)
x
α