# FANUC Series 16/18/160/180-Model C Machining Center Operators Manual PROGRAMMING
14. FUNCTIONS TO SIMPLIFY
PROGRAMMING
B–62764EN/01
244
The following equation shows the general relationship between (x, y, z)
in the program coordinate system and (X, Y, Z) in the original coordinate
system (workpiece coordinate system).
X
Y
Z
= M
1
x
y
z
+
x
1
y
1
z
1
X
Y
Z
= M
1
x
y
z
+
x
2
y
2
z
2
M
2
+
x
1
y
1
z
1
M
1
X, Y, Z : Coordinates in the original coordinate system
(workpiece coordinate system)
x, y, z : Programmed value
(coordinates in the program coordinate system)
x
1
, y
1
, z
1
: Center of rotation of the first conversion
x
2
, y
2
, z
2:
Center of rotation of the second conversion
(coordinates in the coordinate system formed after the
first conversion)
M
1:
First conversion matrix
M
2:
Second conversion matrix
n
1
2
+(1–n
1
2
) cosθ n
1
n
2
(1–cosθ)–n
3
sinθ n
1
n
3
(1–cosθ)+n
2
sinθ
n
1
n
2
(1–cosθ)+n
3
sinθ n
2
2
+(1–n
2
2
) cosθ n
2
n
3
(1–cosθ)–n
1
sinθ
n
1
n
3
(1–cosθ)–n
2
sinθ n
2
n
3
(1–cosθ)+n
1
sinθ n
3
2
+(1–n
3
2
) cosθ
n1 : Cosine of the angle made by the rotation axis and X–axis
p
i
p
n2 : Cosine of the angle made by the rotation axis and Y–axis
j
n3 : Cosine of the angle made by the rotation axis and Z–axis
p
k
θ: Angular displacement
p = i
2
+j
2
+k
2
(1) Coordinate conversion on the XY plane
M=
cosθ –sinθ 0
sinθ cosθ 0
0 ă01
M=
1 0 0
0 cosθ –sinθ
0 sinθ cosθ
(3) Coordinate conversion on the ZX plane
M=
cosθ 0 sinθ
01 0
–sinθ 0 cosθ
When conversion is carried out twice, the relationship is expressed as follows:
M1 and M2 are conversion matrices determined by an angular displacement and
rotation axis. Generally, the matrices are expressed as shown below:
Value p is obtained by the following:
Conversion matrices for rotation on two–dimensional planes are shown below:
(2) Coordinate conversion on the YZ plane
D Equation for
three–dimensional
coordinate conversion 