5 Axis Post Processor PDF
5 Axis Post Processor PDF
Abstract
This paper presents a generic five-axis postprocessor system for various five-axis machine tools. The generalized kinematics model of
common five-axis machines is constructed by combining two rotational degrees of freedom on the fixture table and two rotational
degrees of freedom on the spindle. The complete analytical equations for NC data are obtained through homogeneous coordinate
transformation matrix and inverse kinematics. The derived five-axis NC code expression is a general form suitable for all kinds of
five-axis machine tools with three orthogonal linear axes and two orthogonal rotational axes. A window-based postprocessor
software written by Borland C++ Builder and OpenGL has been developed according to the presented algorithm. The wireframe model
of the configured five-axis machine tool can be promptly shown and rotated/zoomed dynamically on the screen to assist the user to
input relevant parameters correctly and efficiently. Through the implementation of the developed postprocessor and the verification
by the solid cutting simulation software as well as the real machining experiment, the effectiveness of the proposed scheme was
confirmed.
r 2006 Elsevier Ltd. All rights reserved.
0890-6955/$ - see front matter r 2006 Elsevier Ltd. All rights reserved.
doi:10.1016/j.ijmachtools.2006.06.002
ARTICLE IN PRESS
538 C.-H. She, C.-C. Chang / International Journal of Machine Tools & Manufacture 47 (2007) 537–545
YTy , Ysp
nss
nsp
OTy , Osp X Ty , X sp
Yw Yss , Yt
L sp ,ss
Workpiece
ZTy , Z sp
Xss , Xt
Ow Xw Oss , Ot
Yws
Py
L w,ws Zw Z ss , Z t
− nws
t tax rpt
Ows X ws
Yb
Z wp , ZTx ZTz
The tool axis vector ttax and the position vector of the data can be expressed in the matrix form as follows:
cutter tip center rtp with respect to system Ot X t Y t Z t can be 2 3
transformed to system Ow X w Y w Z w , and obtain ttax ,rtp K x Qx
using Eq. (2). The transformation is as follows: 6K 7
K Q 6 y Qy 7
¼6 6 K z Qz 7,
7 (4)
" # " # 0 1 4 5
tw
ax rw
p ttax rtp 0 1
¼ w At
0 1 0 1
¼ TransðLw;ws;x ; Lw;ws;y ; Lw;ws;z ÞRotðnws; fnws Þ where K x , K y and K z are direction cosines of the vector of
tool orientation K; Qx , Qy and Qz are the components of
TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z Þ the tool tip centre’s position vector Q. The two vectors are
Rotðnwp; fnwp ÞTransðPx ; Py ; Pz Þ relative to the workpiece coordinate system. Once the CL
Rotðnsp; fnsp ÞTransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z Þ data matrix is obtained, determining five reference inputs
" t # (three linear motions plus two rotary motions) for the five-
tax rtp
Rotðnss; fnss Þ : ð3Þ axis machine used is referred to as inverse kinematics
0 1 transformation.
Equating CL data matrix and form-shaping function
matrix, and taking the corresponding elements of the first
Eq. (3) describes the form-shaping function matrix [12]
column of two matrices lead to the following equation:
of generalized five-axis machine tool consisting of three
" #
linear axis motions and four rotational axis motions of K
which only two of them are active; and this matrix will be ¼ TransðLw;ws;x ; Lw;ws;y ; Lw;ws;z ÞRotðnws; fnws Þ
employed to determine the desired joint parameters, i.e. 0
fnwp , fnws , fnsp , fnss , Px , Py and Pz . TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z Þ
Rotðnwp; fnwp ÞTransðPx ; Py ; Pz ÞRotðnsp; fnsp Þ
" t #
2.3. Inverse kinematics for determining rotary motions tax
TransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z ÞRotðnss; fnss Þ .
0
Most current CAD/CAM systems can produce the CL
data for five-axis machining of free-form surfaces. The CL ð5Þ
ARTICLE IN PRESS
540 C.-H. She, C.-C. Chang / International Journal of Machine Tools & Manufacture 47 (2007) 537–545
Two of the joint angles (fnwp , fnws , fnsp and fnss ) on the the second column of two matrices yield
right-hand side of Eq. (5) are unknown and should be " #
solved. According to the rotational movement character- Q
¼ TransðLw;ws;x ; Lw;ws;y ; Lw;ws;z ÞRotðnws; fnws Þ
istics, the five-axis machine tool can be designated as six 1
types, i.e. AB, AC, BA, BC, CA and CB types. There are
TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z Þ
two feasible tool orientations for each type, which meet the
five-axis machining requirement. The spindle-tilting AB Rotðnwp; fnwp ÞTransðPx ; Py ; Pz Þ
type is chosen as an example. In this case, fnws ¼ fnwp ¼ 0, Rotðnsp; fnsp ÞTransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z Þ
nsp x and nss y, the right-hand side of Eq. (5) for tool " t#
rp
orientation along the X, Y and Z axis can be obtained as Rotðnss; fnss Þ . ð9Þ
follows: 1
T
Rotðx; fx ÞRotðy; fy Þ 1 0 0 0 Three unknowns (Px , Py and Pz ) in Eq. (9) should be
h iT T h iT
¼ Cfy Sfx Sfy Cfx Sfy 0 , ð6Þ solved. Let P 1 ¼ Px Py Pz 1 , then Eq. (9)
reduces to
T h iT " #
Rotðx; fx ÞRotðy; fy Þ 0 1 0 0 ¼ 0 Cfx Sfx 0 , Q
¼ TransðLw;ws;x ; Lw;ws;y ; Lw;ws;z ÞRotðnws; fnws Þ
(7) 1
T TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z ÞRotðnwp; fnwp Þ
Rotðx; fx ÞRotðy; fy Þ 0 0 1 0 (" #
h iT P
¼ Sfy Sfx Cfy Cfx Cfy 0 , ð8Þ þ Rotðnsp; fnsp Þ
1
" t #)
where ‘‘C’’ and ‘‘S’’ refer to cosine and sine functions, rp
respectively. Eq. (7) indicates that the tool orientation TransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z ÞRotðnss; fnss Þ .
1
along the Y-axis is infeasible for the AB type machine tool
since the rotational effect of the B axis (fy ) cannot be ð10Þ
exhibited and does not appear in the right-hand side of
Therefore, the linear joint parameters (Px ,Py and Pz ) can
Eq. (7). Consequently, the AB type machine tool should
be obtained as follows:
have the tool orientation along the X or Z-axis only. The
" #
joint angle solutions for the spindle-tilting type are P
summarized in Table 1, where arctan 2(y,x) is the function ¼ fTransðLw;ws;x ; Lw;ws;y ; Lw;ws;z ÞRotðnws; fnws Þ
1
that returns angles in the range of p%y%p by examining
the sign of both y and x [10]. Similarly, the joint angle TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z Þ
" #
solutions of the other types (table-tilting and table/spindle- Q
1
tilting type) can also be obtained by the same procedure. Rotðnwp; fnwp Þg Rotðnsp; fnsp Þ
1
2.4. Inverse kinematics for determining linear motions TransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z Þ
" t#
rp
As before, equating CL data matrix and form-shaping Rotðnss; fnss Þ . ð11Þ
function matrix, and taking the corresponding elements of 1
Table 1
General joint angle solutions for spindle-tilting type machine tool
Note that Px , Py and Pz are not the actual NC code over, because of the simplicity of derivation, the two
expressions (denoted as X, Y and Z). The axis command of rotary axes for table-tilting and spindle-tilting type
linear movements of the machine tool should be referred configuration are usually assumed to intersect for each
to the program coordinate system. The program co- other for most of the previous researches. In this paper,
ordinate system is assumed here to coincide with the there is an offset vector between the two rotary axes.
workpiece coordinate system. Consequently, the desired Consequently, the presented NC data equation is a
X, Y and Z values of NC data in programming can general form for the generalized five-axis machine tool.
then be determined using Eq. (10) under the condition 3. Because many combinations can be synthesized to
h iT
generate various multi-axis machine tool configurations
fnwp ¼ fnws ¼ fnsp ¼ fnss ¼ 0, and Qx Qy Qz 1 ¼
T and the multi-axis NC data can only be applied to the
X Y Z 1 . This leads to specific configuration, the portability of the NC data is
inevitably reduced. In this paper, the NC data are
X Y Z 1 T ¼ TransðLw;ws;x ; Lw;ws;y ; Lw;ws;z Þ explicitly expressed in terms of the CL data. The CL
TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z Þ data can also be obtained by using Eqs. (5), (9) and (12)
(" # " t #)
P rp if the original NC code is known, and can then be
þ TransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z Þ transformed to the dedicated NC data for different
1 1
configurations. Therefore, the presented methodology
¼ TransðLw;ws;x ; Lw;ws;y ; Lw;ws;z Þ can enhance the facility and flexibility of machine tools.
TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z Þ 4. The developed multi-axis postprocessor method deals
ðTransðLw;ws;x ; Lw;ws;y ; Lw;ws;z ÞRotðnws; fnws Þ with the machine tool configuration whose linear and
TransðLws;wp;x ; Lws;wp;y ; Lws;wp;z Þ
rotational movements are orthogonal. In case of the
" # five-axis machine tool with a nutating head/table whose
Q
Rotðnwp; fnwp ÞÞ1 Rotðnsp; fnsp Þ rotational axis is in an inclined plane, the general
1 rotation transformation matrix [10] should be used.
" #
rtp However, the analytical equations of NC data can be
TransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z ÞRotðnss; fnss Þ
1 derived by the same procedure as described in the
" #) orthogonal configuration.
rtp
þTransðLsp;ss;x ; Lsp;ss;y ; Lsp;ss;z Þ . 5. Since the analytical equations of the output NC data are
1
explicitly expressed in terms of CL data, the computa-
ð12Þ tional error can be assured during the transformation.
Eq. (12) represents the complete desired analytical However, considering the practical viewpoint where the
solutions for NC data of the generalized five-axis machine rotary and linear motion takes place simultaneously for
tool. Once the appropriate joint angle values shown in multi-axis machine tool, the actual tool motion trajec-
Table 1 are specified, the NC data of the specific five-axis tory with respect to the workpiece will be not linear and
machine tool’s configuration can be readily obtained. become a curved path. The non-linear curved path will
deviate from the linearly interpolated straight line path
between successive path points, and this is known as the
3. Discussion linearization problem [2]. To deal with this situation,
most postprocessors use the post command LINTOL to
1. The joint angle solutions shown in Table 1 for each type specify the deviation tolerance and additional inter-
of configuration are typical solutions. For the same CL mediate control points should be added to ensure that
data, there is another possible solution. The AB the deviation is less than the tolerance [14,15].
configuration type with the X axis tool orientation is
chosen as an example. The joint angle solution of the B
axis is fy ¼ arccosðK x Þ, whose value is in the range of
0pfy pp. However, if the operating range of the tilting 4. Implementation and verification
head is in the range between p and 0, the solution
should be modified as fy ¼ arccosðK x Þ. On the other 4.1. Software implementation
hand, if the operating range of the tilting head meets the
two possible solutions, the shortest rotational angle To verify the effectiveness of the proposed methodology,
movement of the tilting head is usually to be chosen. a window-based postprocessor software has been devel-
2. The advantage of the proposed algorithm is that the oped under the Windows-XP environment with the Bor-
linear joint parameters (Px , Py and Pz ) are explicitly land C++ Builder programming language and the
determined in the matrix form. On the contrary, the OpenGL graphics library. Fig. 3 shows the snapshot of
conventional approach, which solves three simultaneous the system initiation dialogue, indicating the generalized
equations to derive the parameters, is tedious and time- kinematics model including the primary and secondary
consuming for various kinds of configurations. More- rotary axes on the workpiece table and the spindle for the
ARTICLE IN PRESS
542 C.-H. She, C.-C. Chang / International Journal of Machine Tools & Manufacture 47 (2007) 537–545
five-axis machine tool. The user first selects two rotary axes tool and simulate the NC data as well as CL data. Fig. 6
and the corresponding rotational directions. The system shows that a table-tilting type machine tool is constructed
will automatically display the wireframe model of the in the software environment and the final shape of the
configured machine tool and two feasible tool orientations. workpiece is simulated. Note that the two rotary axes are
The user can use the mouse to rotate/zoom the model to assumed not to intersect each other, and the offset vector
assure whether the kinematics model is correct or not, from the centre of the secondary rotary table to the centre
or pick the ‘‘Reset’’ button to restart the configuration of the primary rotary table, as shown in Fig. 4, is
procedure. Lws;wp ¼ 10i 20j 30k. This phenomenon should be
Once the kinematics model has been configured reflected in the VERICUTscomponent tree as shown in
correctly, the user should enter the relevant parameters Fig. 6. Moreover, the stock should be placed in the
for NC machining, e.g. the offset vector from the program appropriate position so that the offset vector from
origin to the centre of the secondary rotary table, the offset the program origin to the center of the secondary rotary
vector from the centre of the secondary rotary table to the table is Lw;ws ¼ 25i 25j 15k, as indicated in Fig. 4.
centre of the primary rotary table, the offset vector from Once the configuration process has been completed, the soft-
the centre of the primary rotary spindle to the centre of the ware system reads the NC data to perform the cutting action.
secondary rotary spindle and the tool tip vector. Finally, In addition, the system can output the transformed CL data
the target CL data are opened by clicking the ‘‘File’’ button that can be double-checked with the original CL data.
and the NC data will be generated accordingly. Moreover, Fig. 7 shows the result for simulating the NC data in a
since the presented system is a generalized postprocessor, spindle-tilting type machine tool. As before, the two rotary
the corresponding CL data can also be transformed if the axes are assumed not to intersect each other and the offset
user opens the NC data for the configured machine tool. In vector from the centre of the primary rotary spindle to the
addition, to confirm the feasibility of the proposed centre of the secondary rotary spindle is Lsp;ss ¼ 120i þ
algorithm, two typical machine tool’s configurations, 20j þ 10k as shown in Fig. 5. Since the spindle will rotate
namely the table-tilting type and the spindle-tilting type, during machining, the tool tip vector determined from the
are tested respectively. Figs. 4 and 5 show the screenshots centre of the secondary rotary spindle to the tool tip centre
of the system execution dialogue for the table-tilting type is required for NC data generation. As shown in Fig. 7, the
and the spindle-tilting type with Z-axis tool orientation. signed distance from the centre of the secondary rotary
spindle to the gauge plane is 0i þ 0j 440k and the gauge
4.2. VERICUTs verification length for the tool is 150 mm. Therefore, the tool tip vector
shown in Fig. 5 should be entered as 0i þ 0j 590k. The
The generated five-axis NC data are further verified on results shown in Figs. 6 and 7 demonstrate that the
the solid cutting simulation software VERICUTs [13], developed postprocessor method is highly effective and
which can build the kinematics model of an NC machine reliable.
ARTICLE IN PRESS
C.-H. She, C.-C. Chang / International Journal of Machine Tools & Manufacture 47 (2007) 537–545 543
Fig. 4. Execution dialog for generating the table-tilting type machine tool’s NC data.
Fig. 5. Execution dialog for generating the spindle-tilting type machine tool’s NC data.
Fig. 6. Screenshot of the VERICUTs simulation and verification for the table-tilting type machine tool.
Fig. 7. Screenshot of the VERICUTs simulation and verification for the spindle-tilting type machine tool.
Acknowledgements
References