Automatic Automatic Generating CNC-Code For Milling MachineGenerating CNC Code For Milling Machine
Automatic Automatic Generating CNC-Code For Milling MachineGenerating CNC Code For Milling Machine
International Journal of Mechanical, Aerospace, Industrial, Mechatronic and Manufacturing Engineering Vol:7, No:12, 2013
International Science Index, Industrial and Manufacturing Engineering Vol:7, No:12, 2013 waset.org/Publication/9997088
Minor
I. INTRODUCTION
2607
scholar.waset.org/1999.8/9997088
International Science Index, Industrial and Manufacturing Engineering Vol:7, No:12, 2013 waset.org/Publication/9997088
one product. When the errors are found, all steps are repeated
starting from the beginning [3].
To easily cut and obtain high surface accuracy, the extra
component of the cutting machine called metal working latch
was invented for holding the workpiece during the operation
[4]. After the traditional period, the rapid-improvement
machines have become as new solutions for supporting the
operation of several shapes of the workpiece over the casting
processes. Drilling, turning, milling, and grinding machines
have been applied for easily adjusting the cutting parameters
and also providing sharp-edge shapes and these machining
processes require low set-up cost and time comparing to
forming, molding, and casting processes. However, these
machining processes are more expensive for high volumes
where skilled operator is required for reducing wastes and
producing high tolerance on dimensions and surface finishes
[5].
In order to reduce processing time, cost for the waste
material and human-labor required, computerized numerical
control (CNC) machines have been introduced as the
technology for producing the product due to the commands
obtained from the computer analysis [6].
The two main objectives of applying CNC machine in
cutting operation are to eliminate some human errors, and
provide high surface accuracy of the part.
The input of this CNC operation is 3D CAD model which is
then used for analyzing, calculating, and generating the
toolpaths (i.e., program for cutting process). After obtaining
the program, the CNC machine works by reading the
thousands of bits of information stored in the program
computer memory. To place this information in the memory,
the programmer creates a series of instructions or commands
where the machine can understand.
The program may consist of code commands or G-code,
such as "M03" which instructs the controller to move the
spindle to a new position, or "G99," which instructs the
controller to read an auxiliary input from some process inside
the machine. Code commands are the most common way to
program a CNC machine tool. However, the advancement in
computers has allowed the machine tool manufacturer to offer
"conversational programming," where the instructions are
similar to the plain words [7], [8].
In conversational programming, the "M03" command is
entered simply as "MOVE," and the "G99" command is
simply "READ." This type of programming allows faster
training and less memorizing of the code meanings by the
programmers. The difficulties and errors (e.g., selecting the
wrong function provided onto the machines screen,
transferring the wrong codes, setting the wrong cutters
positions, assigning the wrong tool length, or creating the
wrong toolpaths) are always presented at the initial of the
CNC operation and the manufacturer have tried to generate the
codes to be in simple formats from a compactable 3D virtual
model. In general, codes for controlling machine contain the
cutting tools applied, size and shape of the object, the
properties of material, the toolpaths, and the starting/finishing
points. They all are interpreted into the computer commands
2608
scholar.waset.org/1999.8/9997088
International Science Index, Industrial and Manufacturing Engineering Vol:7, No:12, 2013 waset.org/Publication/9997088
T
TABLE
I
GEOMEETRIC SHAPES
T
Type
Poolygon
(with fillet at every corner)
Trapezoid
E
Ellipse
Combiined shapes
2609
scholar.waset.org/1999.8/9997088
Models
International Science Index, Industrial and Manufacturing Engineering Vol:7, No:12, 2013 waset.org/Publication/9997088
A. Creating Commands
C
Baased On MATL
TLAB
MATLAB program is useed for creatingg simple com
mmands,
w
G-cod
de for operatin
ng CNC
caalculating, connverting, and writing
m
machine.
MATLAB platform
p
conccludes the num
mbers of synntax. In
orrder to create commands onn MATLAB platform, threee main
paarts are requirred; inputting parameters, calculating
c
daata, and
coonverting as shhown in Fig. 2.
2
The platform
m provides some questionns for assigniing the
baasic parameterrs of the objeect such as shhape, and dim
mensions
(aaccording to mathematicall formulas off geometric shapes).
s
Thhen MATLAB calculates and analyzess the input daata and
coonverts them automatically
a
into the template provided..
Inputtingg
Parameterrs
Caalculating
Data
Converting
data
T
steps of creating
c
MATL
LAB platform
Fig. 2 Three
B. Generatingg G-Codes
After converting data too be in the machines
m
lannguage,
M
MATLAB
startts to print thee set of G-codde which is the
t new
coommands forr controlling CNC machiine into the simple
foormat (i.e., *.ttxt), Presentedd in Fig. 3 is the G-code sttored in
N
Notepad
platforrm. The input data are listedd:
- The turret number
n
10 (T
T10).
- M08 repressents flood cooolant.
o tool is 16 m
mm.
- Diameter of
c is 3 mm of depth per cu
ut.
- Depth per cut
w 7 corners with
w 2 mm off radius of filleet.
- Polygon with
min.
- Clockwise contour path with feed ratee of 211 mm/m
- Spindle speeed of 5252 rppm.
2610
scholar.waset.org/1999.8/9997088
whhereas the ty
ype of the ppart which iss being mach
hine is
preesented on th
he left colum
mn. Since the part is differrent in
shaape, the signiificant parameeters are assig
gned and conssidered
wiith different crriteria and calcculations.
TA
ABLE IV
RESULT OF PYRAMIID POLYGON WITH
H FILLET
International Science Index, Industrial and Manufacturing Engineering Vol:7, No:12, 2013 waset.org/Publication/9997088
T
Type
Pyramid polyygon and frustum
m
(with fillet at
a every corner)
F 5 TOP view
Fig.
w of cylindricaal billet
TA
ABLE V
RESULTT OF HEMISPHEREE AND FRUSTUM HEMISPHERE
TABLE II
RESULT OF CONE AND FRUSTU
UM
Tyype
T
Type
Hemispherre and frustum
hem
misphere
Parameters
1. Base
B
radius (rb)
2. Top
T radius (rb)
3 Height (H)
3.
Parameters
1. Number
N
of Corneer
2. Radius
R
of fillet (rf)
3. Height (H)
Parameters
1. Base radius (rb))
2. Top radius (rt)
TA
ABLE VI
RESULT OF POLLYGON WITH FILL
LET
T
Type
Poolygon
(with fillet at
a every corner)
Parameters
1. Number
N
of Cornerr
2. Radius
R
of fillet (rff)
TA
ABLE III
RESULT OF PYRAMID POLYG
GON AND FRUSTUM
M WITHOUT FILLE
ET
Tyype
Pyramid polyggon and frustum
(without fillet at every corner)
Parameters
1. Nuumber of Corner
2. Raadius of fillet (rf)
TA
ABLE VII
RESULT OF
O TRAPEZOID
T
Type
Traapezoid
V. RESULTS
The results of
o the proposeed approach arre shown in Tables II
to
o X. On each
h table, the input
i
parameters, tool patths and
sh
hapes are ask
ked and shoown on the parameters column
2611
scholar.waset.org/1999.8/9997088
Parameters
1. Top length
2. Bottom length
3. Height (H)
TABLE VIII
RESULT OF PYRAMID TRAPEZOID AND FRUSTUM
Type
Pyramid trapezoid and frustum
Parameters
1. Top length
2. Bottom length
3. Bottom length of top layer
4. Height (H)
International Science Index, Industrial and Manufacturing Engineering Vol:7, No:12, 2013 waset.org/Publication/9997088
VII. CONCLUSIONS
TABLE IX
RESULT OF ELLIPSE
Type
Parameters
1. Length of a
2. Length of b
3. Height (H)
Ellipse
TABLE X
RESULT OF COMBINED SHAPES
Type
Parameters
Combined shapes
Feature selection
VI. DISCUSSIONS
This research focuses on how to reduce the times and
redundant steps of CNC-machining process. The proposed
technique can help to eliminate some redundant activities for
redesigning the minor changes. The proposed technique can be
considered as the new alternative channel to generate a set of
G-code without using CAD and CAM program for remodifying virtual model. The simple shapes (e.g., rectangle,
triangle and polygon) are the first target that had been done for
demonstrating the proposed approach.
The simple questions will be provided for the user to easily
input the parameters which have the direct effects on the
cutting parameters. After obtaining all geometric parameters,
the developed program starts to calculate, converting, and
writing the G-code. For these reasons, the user does not
perform back-and-forth process to recreate model or
regenerate the toolpaths where the applications of CAD and
CAM are not required. However, this proposed technique is
REFERENCES
[1]
[2]
[3]
[4]
[5]
2612
scholar.waset.org/1999.8/9997088
[6]
[7]
[8]
[9]
[10]
[11]
[12]
International Science Index, Industrial and Manufacturing Engineering Vol:7, No:12, 2013 waset.org/Publication/9997088
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
2613
scholar.waset.org/1999.8/9997088