ArticlePDF Available

Abstract and Figures

This paper evaluates the feasibility of using parametric programming in the implementation of feature-based machining. Custom Macro B was used in this study. Macro programming technique comprises of a main program and subprograms. NC program for a basic type of machining feature namely pocket was first generated using macro and CAM system. Macro program utilizes very fewer blocks than CAM generated program. The different between both programming methods are discussed. Finally, an integrated feature based machining system is proposed.
Content may be subject to copyright.
International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225, 2013
ISSN 2289-4152
© Academic Research Online Publisher
Research Article
Parametric Programming in Feature-Based Machining
M.A. Razak a,*, M.R. Ibrahim a, S. Sulaiman a, A. Jusoh b, A. Zakaria b
a Manufacturing Section, Universiti Kuala Lumpur Malaysian Spanish Institute, Kedah, Malaysia
b Universiti Kuala Lumpur Institute of Product Design and Manufacturing, Kuala Lumpur, Malaysia
* Corresponding author. Tel.: 604 403 5199; fax: 604 403 5201
E-mail address: alhapis@msi.unikl.edu.my
A b s t r a c t
Keywords:
Parametric programming
Feature-based machining
CNC
Macro
This paper evaluates the feasibility of using parametric programming in the
implementation of feature-based machining. Custom Macro B was used in this
study. Macro programming technique comprises of a main program and
subprograms. NC program for a basic type of machining feature namely pocket
was first generated using macro and CAM system. Macro program utilizes very
fewer blocks than CAM ge
nerated program. The different between both
programming methods are discussed. Finally, an integrated feature based
machining system is proposed.
Accepted:17 July 2013 © Academic Research Online Publisher. All rights reserved.
1. Introduction
Machining feature is the remnant volume after subtracting the designed feature from the raw material
[1, 2, 3, 4]. Rough machining feature is the volume after roughing is subtracted from the raw material.
The machining feature should include the topological and geometric information of the machining
region to offer preliminary data for generating the machining strategy. Examples of machining
features include faces, pockets, holes, and slots.
M.A. Razak et al. / International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225,
2013
219 | Page
Fig. 1: Example of machining feature
The machining features used to make a specific part may be instances of a fixed library of
parametrically defined features, or they may be defined without a library by making boundary or
constructive solid geometry representations [5]. There are many alternative definitions of machining
features. To machine a part, both the machining features and the machining operations must be
defined, and the operations must be sequenced. A feature-based machining system strengthening the
function of material removal machine to work in more intelligent and helps the user to shorten the
pre-machining setup time [6]. While a generative process planner enables a computer numerical
control (CNC) machine to automatically define the operations for cutting the designed features [5].
Without machining feature, program is input manually and the cutting path will based on the
coordinate given. Programming will take longer time and the machining efficiency will not achieve as
good as feature-based.
Fig. 2: Feature approaches classification [7]
Feature-based machining can be implemented in three ways as shown in Fig. 2. Design by feature [8]
is a technique by which the designer can document and communicate the design intent. For instance to
define a hole, designer can specify radius, depth and location parameters. The second approach is by
means of pattern recognition. This method is largely used in computer-aided manufacturing (CAM)
software. However generating NC program by commercial CAM software will result in longer part
program besides utilizing a large memory space in CNC machine controller [9]. And the last approach
is by human assisted recognition. Based on human-assisted recognition, this paper aimed in evaluates
the feasibility of using parametric programming in the implementation of feature-based machining.
M.A. Razak et al. / International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225,
2013
220 | Page
2. Parametric Programming by Macro
Parametric programming [10] is applied to CNC operations in generating a single CNC program for
parts with similar design, inventing macros for machining custom design features, and developing
subprograms for a group of parts that are not similar in design but require similar machining
operations. Parametric programming can significantly reduce the part programming time and these
applications particularly fit group technology manufacturing in which similar parts are grouped into
part families and then processed by a number of machine tools within a cell or by a single multi-
tasking machining center. Different controller manufacturer provide different version of parametric
programming such as User Task (from Okuma), Q Routine (from Sodick), and Advanced
Programming Language (APL) (from G&L). In Fanuc or Fanuc compliant CNC controller, parametric
programming can be implemented by Custom Macro B.
Macro is very similar to subroutine. The different is that macro enables user to specify arguments and
control the variables [11]. With macros, repetitive cycle can be defined. It may be considered as the
highest level of NC programming [12]. This technique is more powerful and flexible. In the
conventional CNC programming, there is limitation in terms of function of each G-Code. Designed in
separated programs, macros can be called by the main program or other macros using macro number.
Fig. 3 shows the path taken by G&M code interpreter modules [13] which are part of a CNC system
to execute the part program. The conventional G&M codes have to pass through a parser, an executor
and a path generator. Macro program will not go through the normal executor. Macro executor
interprets and executes macro commands included in an NC part program.
Fig. 3: Code interpreter modules [13]
Another advantage of macro is since it is similar to the BASIC language; user can make specific
functions that are not provided by the CNC maker by using macro language.
M.A. Razak et al. / International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225,
2013
221 | Page
3. Methodology
Fig. 4 and 5 show the experimental workflow and graphic simulation in CAM. The most commonly
machining feature in tool and die making; pocket was used in this study. Feature was first created in
CAD and its NC program generated by a commercial CAM. NC programs are also generated by
manual programming using macros. Machining simulation was then performed on a CNC milling
machine controller to prove its functionality. The experiment was carried out on Fanuc Robodrill α-
T14ίFse machine with Fanuc Series 31ί-Model-A controller. Different sizes of pockets (width, length
and depth) were studied. Machining parameters such as spindle speeds and feedrates were kept
constant. High speed steel (HSS) straight end mill of 10mm diameter was used for this purpose.
Fig. 4: Experimental workflow
Fig. 5: Graphic simulation in CAM
M.A. Razak et al. / International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225,
2013
222 | Page
In macro program, variable numbers represent specific information declared by user or referred to
earlier part programs. For instance, #1 is representing the pocket length and #2 refers to pocket width.
To generate a new program for different design, the user needs only to redefine the variables in the
macro. As there is no new program added, the memory used in the controller remains more or less
constant.
There are main program and macro program in macro approach. The main program prompts user to
select the type of feature required. Once selected, user is requested to key in details of the feature.
These include its center location, pocket length, depth, corner radius, depth and width of each cut, tool
number, cutting feedrate and spindle speed. The different between macro and CAM generated NC
programs are discussed in the next section.
3. Results and Discussion
a) CAM generated NC program b) Macro program
Fig. 6: Different between CAM generated and macro program
In the conventional CNC part program, G-Codes are used for specific functions. For example, modal
G codes such as G1, G2 and G3 are for linear interpolation, clockwise interpolation and counter-
clockwise interpolation respectively while the canned cycle like G81 is for drilling a hole. The same
codes may be used repeatedly in order to create or to cut a given machining feature. This technique is
applied in CAM to generate NC program as shown in Fig. 6 (a). Therefore, the size of NC programs
generated by commercial CAM system is usually very large. When using parametric programming,
N126 G1 Z69.025
N128 X-5.
N130 Y-120.
N132 X5.
N134 Y-110.
N136 Z79.025
N138 G0 Z80.
N140 X2.5 Y-112.5
N142 Z79.025
N144 G1 Z68.05
N146 X-2.5
N148 Y-117.5
N150 X2.5
N152 Y-112.5
N154 Z78.05
N156 G0 Z80.
N158 X5. Y-110.
N160 Z79.025
N162 G1 Z68.05
N164 X-5.
N166 Y-120.
N168 X5.
N170 Y-110.
N172 Z78.05
WHILE[#118LT[#111-#117-#23]]DO1
#118=[#118+#10]
IF[#118GE[#111-#117-#23]]THEN
#118=[#111-#117-#23]
Y[#102-[#112-#117-#23]]
X[#101-[#118-#23]]
Y[#102+[#112-#117-#23]]
X[#101+[#118-#23]]
Y[#102-[#112-#117-#23]]
X#101
END1
M.A. Razak et al. / International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225,
2013
223 | Page
the routines can be written as simple as shown in Fig. 6 (b) and makes it much shorter compared to
CAM.
With CAM, the part program can be thousands of blocks in size. It happened because of CAM
generates the program based on cutting path coordinate. The larger the machining part, the longer the
part program. Also the deeper the cutting depth, the larger the program sizes. On the contrary, the
macro program size for the same feature can be constant for different sizes. This is due to the fact that
the size changes can be done by simply redefining the feature variables. These variables are defined
once only but their values can be changed according to the feature. If redefined in main program, the
new arguments will be used by the called macros. Fig. 7 (a) shows macro call program for a pocket.
a) Macro call for rectangular pocket
b) Pocket macro (in machine memory)
Fig. 7: Macro program for pocket
The block “G65P0147X#24Y#25A#1B#2C#3D#7U#21 F#109W#23T#20” can be translated as call a
pocket macro from memory O0147 with the parameters X, Y, A, B, D, U, F, W, and T. Therefore for
a new pocket feature, user needs only to change these parameters. The pocket macro in Fig. 7 (b) is
not visible to the user. It stored in machine memory.
……
G65P0147X#24Y#25A#1B#2C#3D#7U#21F#109W#23T#20
……
O0147 (RECTANGULAR POCKET)
N100G0G90X#101Y#102Z5.(POCKET CENTER LOCATION)
G1Z[#510-#12]F#9
N200WHILE[#118LT[#111-#117-#23]]DO1(COND_DO
POCKET)
#118=[#118+#10]
IF[#118GE[#111-#117-#23]]THEN#118=[#111-#117-
#23]
Y[#102-[#112-#117-#23]]
X[#101-[#118-#23]]
Y[#102+[#112-#117-#23]]
X[#101+[#118-#23]]
Y[#102-[#112-#117-#23]]
X#101
END1
N250IF[#12GE#3]GOTO300(COMPLETE Z ROUGH)
#12=[#12+#21]
IF[#12GE#3]THEN#12=#3(COMPLETE Z ROUGH)
#118=0(START NEW POCKET CYCLE WITH NEW DEPTH)
GOTO100
N300IF[#23EQ0]GOTO400
G1X[#101-[#111-#117]]Y[#102-[#112-
#117]](FINISHING)
Y[#102+[#112-#117]]
X[#101+[#111-#117]]
Y[#102-[#112-#117]]
X[#101-[#111-#117]]
M99
M.A. Razak et al. / International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225,
2013
224 | Page
Fig. 8: Simulation on CNC controller
Unlike macro, CAM software will generate a new program for the same feature although there are
minute changes in its parameters. This is where the user can apply macros as alternative. By
controlling the variables, no more programs to generate for the same feature. Unfortunately many
CNC machines come with a limited working memory. Consequently for a machine without a DNC
facility, transferring a new part program is difficult without first deleting some old programs.
Other advantage of macro is that, users are allowed to create their own canned cycles, automatic
determination of feedrate and spindle speed, and creation of new alarms other than that provided by
the controller manufacturer. These all are can easily be done by macros. However, few CNC users are
aware about the existence of macro and know how to create macro program. In fact, people in
industries are continuing the same daily routine with using CAM to generate NC program. This is
mainly because of creating macro program requires individual programming skills and hence users are
often eschew this task. The good news is currently there are softwares available in the market to
simulate limited capability of macro program.
4. Conclusions
From the result, it is confirmed that parametric programming can be used in the implementation of
feature-based machining. For a given feature, commercial CAM system generates large program
blocks hence there is an increase in program memory. With the macro approach however, one can
expect comparatively much smaller program size. Consequently, in practice the old files need no
longer to be deleted very frequently before transferring new programs. Although this could be the
main advantage of macro program over conventional CAM system, further analysis is required
particularly in terms of surface finish, machining time or even ease of programming. Finally, it is
envisaged that an integrated feature based machining system can be realized by having macro
programs integrated GUI (graphical user interface). Hence a post processor is no longer required for
NC program generation.
M.A. Razak et al. / International Journal of Engineering & Technology Sciences (IJETS) 1(4): 218-225,
2013
225 | Page
References
[1] E.Y. Heo, D.W Kim, J.Y Lee, C.S. Lee, F.F. Chen. High Speed Pocket Milling Planning by
Feature-Based Machining Area Partitioning. Robotics and Computer-Integrated Manufacturing,
2011; 27:706–713.
[2] A. Cardone, S.K. Gupta, A. Deshmukh, M. Karnik. Machining Feature-based Similarity
Assessment Algorithms for Prismatic Machined Parts. Computer-Aided Design 2006; 38:954–972.
[3] X. Xu, S. Hinduja. Recognition of Rough Machining Features in 2.5D Components. Computer-
Aided Design, 1998; 30:503–516.
[4] Y.J. Tseng. Fixturing Design Analysis for Successive Feature-based Machining. Computers in
Industry, 1999; 38:249–262.
[5] Kramer, Thomas R. Submitted to National Institute of Standards and Technology, United State of
America 1987.
[6] M. Razak, A. Zakaria. Review on the Evolutions of CNC Programming Methods. 2nd Colloquium
on Manufacturing Technology, Kulim 2010.
[7] A. Mokhtar, A.T. Bina, M. Houshmand. Approaches and Challenges in Machining Feature-Based
Process Planning. 4th International Conference on Digital Enterprise Technology 2007, London.
[8] S. Venkataraman. Integration of Design by Features and Feature Recognition. Arizona State
University, Arizona 2000.
[9] M. Razak, A. Zakaria. A Framework for a Feature Based Machining using Macro. Applied
Mechanics and Materials Journal, 2012; 110:1711–1715.
[10] M. Djassemi. A Parametric Programming Technique for Efficient CNC Machining Operations.
Computer and Industrial Engineering, 1998; 35:33–36.
[11] User's Manual. Common to Lathe System/Machining Center System. Fanuc series
30i/300i/300is-Model A, Vol. 1-3.
[12] M. Razak, A. Jusoh, A. Zakaria. Feature-Based Machining Using Macro. International
Conference on Machine Design and Manufacturing Engineering, Paris 2012.
[13] S.H. Suh, S.K. Kang, D.H. Chung, Ian S. Theory and Design of CNC Systems. Springer Series in
Advanced Manufacturing, 2008; 82–93.
... This machine is equipped with a vertical main spindle that goes up to 30,000 min -1 (X, Y, Z lineal movements) and is equipped with a high precision, 2 axis trunnion table (B and C angular positioning) for machining complex, prismatic workpieces with a high static and dynamic rigidity during 3, 4 or 5 axis simultaneous milling operations and for infinite part work plane positioning operations ( Figure 1). The watch body case study constitutes a part family and its geometrical features can be classified according to the type of operation to be performed on the part: closed and open pocketing, matrix holes drilling, and contouring are some of these features shown in Figure 2. Drilling of a hole matrix, facing and pocketing are some of the standard machining operations that can be programmed by this technique [5,7]. For these operations, a G-code program operates using programming functions such as G00 for rapid traverse, G01 for linear interpolation, G02 for clockwise circular interpolation, G03 for counter-clockwise circular interpolation, and so on [8,9]. ...
... This issue can be improved by the geometrical parametrization of the hole positions [5]. The milling of a pocket can be programmed through various strategies such as parallel contour or zig-zag and all of them requires the definition of the pocket geometry, its final depth and the depth of the pass to be applied, laterally (X, Y) and in depth (Z) as a function of tool diameter and the workpiece material [7]. ...
Conference Paper
Full-text available
This paper describes a specific application of the Custom Macro B high level language which is within the scope of CNC programming. This type of programming language allows working with parametric part programs, based on the group technology, through which it is possible to save programming time and costs, facilitates the setting works in the machines implying less CN files also of a smaller size of them into the memory used in the CNC equipment. Small spring bars are commonly used to assemble the belt in a watchcase and the necessary drilling operation on the part shows the particularity that it is impossible to make the holes in the direction perpendicular to the plane to be drilled. There are CAD-CAM solutions for this specific work allowing to program inclined drills for its implementation in 4-axis and 5-axis milling machines. The proposed solution is the best choice and the most flexible to this specific case and it has been developed, simulated and evaluated for different part designs, showing a remarkable improvement from the point of view of flexibility and programming time with respect to two different CAD-CAM software tools commonly used as solution to this 5 axes CNC programming feature.
... In article [3] is approached the realization of parametric CNC programs based on recognition of the features of the 3D model and is proposed a new model for Feature-based Machining. ...
Article
Full-text available
This paper presents an on-going research work on the implementation of feature-based machining via macro programming. Repetitive machining features such as holes, slots, pockets etc can readily be encapsulated in macros. Each macro consists of methods on how to machine the shape as defined by the feature. The macro programming technique comprises of a main program and subprograms. The main program allows user to select several subprograms that contain features and define their important parameters. With macros, complex machining routines can be implemented easily and no post processor is required. A case study on machining of a part that comprised of planar face, hole and pocket features using the macro programming technique was carried out. It is envisaged that the macro programming technique can be extended to other feature-based machining fields such as the newly developed STEP-NC domain.
Article
This paper describes a research work to explore the utilization of macros in an effort to improve an overall machining efficiency. Latest models of CNC machine are equipped with many functions and resulting difficulty in creating NC program. Feature based machining is optimizing the capabilities of CNC machine. A novel framework of a feature based machining system using macros is discussed in this paper by applying some normally used features and work material in manufacturing industry. Experiments has been conducted in proving its functionality. This system found enable to reduce pre-machining setup time and easy to used. Lastly, a graphical user interface is proposed.
Article
This paper describes a research work to explore the utilization of macros in an effort to improve an overall machining efficiency. Latest models of CNC machine are equipped with many functions and resulting difficulty in creating NC program. Feature based machining is optimizing the capabilities of CNC machine. A novel framework of a feature based machining system using macros is discussed in this paper by applying some normally used features and work material in manufacturing industry. Experiments has been conducted in proving its functionality. This system found enable to reduce pre-machining setup time and easy to used. Lastly, a graphical user interface is proposed.
Article
Pocket milling operations are involved in two and a half-dimensional (2.5D) machining. The machining area of a pocket has to be divided into several sub machining regions (SMRs) to effectively select the machining parameters for ordinary or high speed milling. A SMR of a pocket has its own characteristic geometry, which implicitly provides machining features used for the generation of strategies for high speed machining. This paper presents a methodology to partition a pocket machining area, as well as to identify machining features used for planning of high speed pocket machining. To generate the machining strategy, the attributes of machining features are defined, and evaluated through a machining volume slicing method. SMR-based partitioning rules are developed based on the geometric features of a pocket. The proposed partitioning algorithm is applied to both simple and complex shaped pockets. A case pocket volume is divided into several SMRs, represented by a tree structure containing associated information for pocket milling planning.
Article
In this paper the application of parametric programming to CNC machining is discussed. As one of the less frequently utilized features of CNC machines, parametric programming has the potential to increase the efficiency of CNC operations. This feature is particularly beneficial to companies with group technology manufacturing where parts with similar design or operational requirements are processed within a machine cell. Using two case studies, the capabilities of parametric programming for CNC machines are illustrated.
Article
In a feature-based model, the features can be used in both part description and machining planning. In a feature-based machining, proper fixture setups are required for locating and holding a workpiece such that a set of features can be machined in sequence. Previous research in fixturing design is focused on analyzing the final shape of the part without considering the successive intermediate steps and the operational precedence during machining. The purpose of this research is to develop a feature-based fixturing analysis system to determine the fixturing parameters required for the intermediate workpieces during a sequential feature-based machining. In a feature-based machining, an intermediate workpiece is produced after a feature is machined. The fixturing setup may need to be changed at an intermediate step such that the subsequent features at different positions can be machined. This research develops a feature-based fixturing analysis method for designing the fixturing setups for a complete feature-based machining process. The machining parts considered are prismatic parts and the features are prismatic machining features including steps, slots, pockets, holes, blind steps, and blind slots. The output of the analysis can be used in design and modelling of fixturing hardware, and also can be applied to evaluate the changeovers in fixturing setups in a successive feature-based machining. A software system is implemented using boundary representation as input and output format. Example parts are tested and discussed.
Article
This paper presents algorithms for identifying machined parts in a database that are similar to a given query part based on machining features. In this paper we only consider parts that are machined on 3-axis machining centers. We utilize reduced feature vectors consisting of machining feature access directions, feature types, feature volumes, feature dimensional tolerances and feature group cardinality as a basis for assessing shape similarity. We have defined a distance function between two sets of reduced feature vectors to assess the similarity between them from the machining effort point of view. To assess similarity between the two parts, one set of reduced feature vectors is transformed in space using rigid body transformations with respect to the other set such that the distance between them is minimized. The distance between the two sets of aligned reduced feature vectors is used as a measure of similarity between the two parts. The existing machined parts are rank ordered based on the value of the distance with respect to the query part. The cost of previously machined parts that have a very small distance from the query part can be used as a basis for estimating the cost of machining the new part.
Article
In this paper, two methods are used to recognize the roughing features in an intermediate workpiece, which is obtained by gluing the finishing features onto the original component. The first method is based on the physical states of equilibrium and hence is referred to as the equilibrium method. This method recognizes features originating from convex inner loops. The second method, referred to as the concavity method, uses the concavity of vertices, edges and faces to detect features and the interactions between them. The features are represented as volumes and are classified according to a feature taxonomy. In this taxonomy, a new class of features, i.e. free features, is included. Examples of such features are blend, edge and vertex volumes. Edge and vertex volumes are combined with face volumes to form face machining features. The methodology is illustrated by recognizing the features in two industrial components.
Article
Thesis (M.S.)--Arizona State University, 2000. Includes bibliographical references (leaves [186]-190).