Dan Wu, Zhiyang Yao and Linda C. Schmidt. Department of ..... Pickett, P.W. and Wang, Jian, An expert system approach to CNC toolpath generation, IEE.
FEATURE-BASED CNC PROGRAMMING ENVIRONMENT ON THE INTERNET
Dan Wu, Zhiyang Yao and Linda C. Schmidt Department of Mechanical Engineering University of Maryland, College Park, MD 20742-3035
ABSTRACT: Effective global manufacturing enterprises require internet-based tools and technologies to virtually integrate the efforts of customers, designers, and manufacturers who work in separate office buildings or on separate continents. We present the framework for an internetaccessible, feature-based, CNC programming environment. The environment empowers users from different geographical sites to control CNC machining processes via real-time simulations, remote access, and remote manipulation. We have implemented an internet-based prototype system for simulating simple turning operations.
INTRODUCTION Feature-based design and manufacturing is a popular paradigm in CAD/CAM and is now driving CAD and CAM strategies. Part representation as a collection of features is advantageous when modifying or analyzing a particular feature. Sophisticated algorithms exist to identify the whole made of the part features and to extract part features from the whole. However, difficulties arise when we attempt to redefine the whole in terms of new set of features – like machining features. This is the task of systems that seek to translate design geometry into machining code. Automated generation of machining code is a complex process requiring detailed part geometry knowledge, machining process knowledge, and fluency in the machine programming instructions. The process involves two skills: interpreting part geometry into machining process steps and translating the process steps into machine programming code. These two steps include modeling parts and reasoning about how they should be manufactured, and writing the manufacturing instructions. Current automated systems use feature-based approaches to these tasks. We propose a different basis for feature definition in order to combine the geometrical information and the manufacturing information precisely and efficiently. We present a new type of feature definition called grouped machine features that is the cornerstone of our feature-based CNC programming (FPCP) system. We have implemented an internet-based prototype system for turning operations. Machine features are grouped and the relevant geometrical and machining information is stored in a relational database. This system is built with internet-friendly JAVA applets. This CNC programming system framework represents a step towards the fulfillment of the promise of global manufacturing.
GENERATING CNC CODE Features have been studied from different views corresponding to different applications. People have defined sets of feature classes including explicit features, implicit features, functional features, manufacturing features, etc. Each definition only considers some specific type of information. Consider the feature called “hole.” A hole expressed as an explicit feature includes geometric data on the hole location, diameter, and depth. CNC programming instructions require addition information such as tool choice, tool-positioning instructions, operating speed of tool, feed rate of part, and number of cuts. One of the commonly used programming codes is G&M code, a word address programming language. A G code is a command in the program specifying the mode in which a CNC machine moves along programming axes and M codes specify CNC machine functions not related to dimensional or axes movements.1 In order to generate G&M codes, the user needs to know all the necessary programming commands and should spend a long time on this tedious programming work. Creating a programming environment that can help the users deal with this programming work is difficult. The most direct way to generated CNC code is to write a computer program to output code in response to user inputs. The computational advantage comes in the absence of mistakes in code writing but this simple strategy does not give the designer help in deciding how the part should be manufactured. Another approach is to create post-processing programs for CNC tools. One such CAD/CAM system translates a drawing file directly into APT motion statements.2 Two problems remain. Motion statements generated in this way don’t always yield feasible tool paths and sitespecific-post-processors have to be developed to translate the APT or CL code into standard CNC language. Holistic approaches aiming at complete automation of the design and manufacturing process must usually restrict themselves to a subset of part types. Many researchers have built feature-based modeling systems and feature-based computer aided process planning (CAPP) systems.3,4 Current feature-based systems are mainly concerned with the complete automation of the design and manufacturing process, so they have to simplify the problems down to a set of common features or part types. ICAPP is an early version of an interactive part planning system for prismatic parts.5 PRISPLAN is a PC-based computer aided process planning system for prismatic parts.4 By inputting the geometric features, the user can get the proper CNC codes from this system. In the cited implementation the system is available as an add-on to AutoCAD. One of the most promising developments in this area is the use of sophisticated graphical interfaces for CNC code generation. Prasad designed a graphic workstation for generation of CNC profile cutting code.13 It features a special-purpose graphic editor that allows the user to draw, edit and nest profiles. Providing visual feedback can eliminate some possible mistakes common to manual coding.
FEATURE-BASED CNC PROGRAMMING SYSTEM (FBCP) The goal of the FBCP system (Figure 1) is to provide the user with the resource of a machining specialist and a CNC code programmer. The generation of machining code requires interpreting part features into a set of machining operations and translating that set of operations into accurate machining code. Once a designer verifies that the selected set of operations will produce the desired part geometry the translation into machining code is straightforward. The FBCP system provides enough feedback to the user on machining operation choices that the user does not need to be an expert in this area. The FBCP system also splits the CNC code translation into a separate routine with feedback in the form of visual display of code. This relieves the user from the burden of
learning CNC programming language, syntax and semantics. As shown in Figure 1, the FBCP creates an interpretation loop that requires only designer knowledge as input and design verification from the user. All other parts of the interpretation and translation are done by the system. The architecture of the FPCP must simplify the interpretation of part features into machining process steps. The FBCP system features four main architectural units: • A feature representation scheme based on the features that are made by machining operations; • A rule-based reasoning system that converts selected machine features into a set of viable machining operations; • A relational database knowledge storage system; and, • A CNC code generation routine. The system isn’t useful until it is wrapped in a user-friendly graphical interface. The details of the user interface will be introduced in Section 4 where the current implementation of the system is introduced.
Grouped Machine Features Part features must be interpreted into the series of machining operations that creates them before the machining operations can be translated into machining code. Part features are individual geometric characteristics of a part, such as a hole or a slot. Features can be independent and simple to identify. Some exist as emergent features created from the intersection of the geometry of two or more part features. We define a machine feature as the geometry achieved when one or more machining operations are performed on a piece of machine stock. Some machine features are the straightforward result of a simple operation, such as a cut. Machine feature complexity arises from the manner in which the process is performed. Machine features are affected by the number of
Part Geometry
RELATIONAL DATABASE
D ESIG N V ERIFICATIO N
Specialist Knowledge
Display of M achining Feature Results
GMF Selection
Machining Features (GMF) Reasoning Engine
Machining Rules
M achine Operations
G&M Code
VISUAL INTERFACE
CNC Code
Translation Routine S PECIALIST A CTIVITY D ESIGNER A CTIVITY
Figure 1. The FBCP system architecture
LINKS
different operations used to make them, part orientations, tool selections, fixtures, and feed and speed rates. We propose the definition of a set of machine features for a particular machining process. There are called grouped machine features (GMF). A covering set of GMF will be sufficient to represent all part features generated by machining operation. In Table 1 we present a table of sample GMF for a turning operation. To completely specify a machining feature, one selects a GMF and specifies the required numerical and selection information. Grouped machine features are a language to describe part features by machining operations. Each grouped machine feature is a schema for a class of machine features. Each GMF has two types of information. The first type includes geometric and cutting information. Explicit information such as the diameter of a cylinder and implicit information such the axis of this cylinder are examples of typical geometric information. The cutting information indicates the geometric parameters along the cutting directions. The second type of GMF information is the manufacturing information that includes details like fixture and cutting tool choices, and cutting speed, depth, and feed rate.
Rule-Based Reasoning System Machining features are represented by a GMF and associated parameters. Machining features are created by the action of one or more machining operations. For example, facing an inch of material from bar stock will be done in more than one cutting pass. The feature, a facing feature of a 1-inch depth, is built from several passes depending on the tool selected. Machining operations are additive TABLE 1. Examples of Grouped Machine Features (GMF) for Turning Name
Geometric Information Explicit
Implicit
Cutting
Facing A
Straight Turning
Right Cutting
A
A
Left Cutting
Cutting off
A
A
Manufacturing Information Typical cutting fixtures
Typical cutting tools
as described by equation 3.2.1. n
P = I − ∑ Fi (3.2.1) i =1
P: Final part I: Initial stock Fi: The ith feature n: The number of features An interpretation step may be needed to convert a machining feature into a feasible set of machining operations. The FBCP requires a reasoning system to recognize machining features that require multiple operations and to determine the proper series of machining operations to generate the feature. The additive nature of machining operations allows us to use a rule-based reasoning system to interpret them into machining operations. There are two types of rules in the FBCP reasoning system: independent rules, housed in a rules database; and, process and feature dependent rules that must be linked to a particular GMF and applied on a feature-by-feature basis. Coolant control and tool change instructions are independent rules and apply at certain points in every operation. These rules are stored in a standard rules database. The number and depth of intermediate cuts to take to create a facing feature depend on the depth of the feature and the cutting speed. A facing rule is shown in equation 3.2.2. If (facing & cutting depth = a & typical cutting depth = b) then (cutting steps = a/b). (3.2.2) The interpretation of a feature dependent rule must be done on a real-time basis. So this type of rule is stored in the relational database and linked to the GMF to which it applies.
Relational Database Structure Grouped machine features must be organized in an adaptable format for holding information specific to each GMF. When a machining feature is selected the system must also access the stored process parameter format and prompt the user to accept the stored parameters or provide alternate parameters. The system must then access the machining operations necessary to create the select GMF and apply any related rules to refine the operation information. Lastly, the system must access the G & M code statements that create the machining operations and supplement them with the partspecific parameters supplied by the user. Grouped machine features (GMF) provide the organizational cues for the FBCP’s relational database. The structure of this relational database is described in Figure 2. Here we show a set of truncated tables of information tied to the GMF data for turning operations.
CNC Code Generation The FPCP writes CNC code from standard statements that create each selected machine feature. The total G&M code, GM, can be obtained in terms of equation 3.4.1: n
m
i =1
j =1
GM = In + ( ∑ ( Ini + ∑ GM j )) + Oth (3.4.1) In: Initial code Ini: When cutting the ith feature, the initial codes Gmj: When cutting the ith features, the generated GM codes in each process Oth: Other codes n: the number of features m: the number of machining processes for each feature
The additive nature of machine features allows the CNC code to be generated in this manner.
Grouped Machined Features (GMFs) for Turning GMF ID Name
GMF ID for “Facing” is 1 Begin:
Facing Straight turning Right cut Left cut :
1 2 3 4 :
Find the parameters for “Facing” by its GMF ID
Name
GMFs with This Feature 1 2 … 1 2 … 2 3 … 1 2 3 : : :
Point Diameter Length Cut Depth :
4
Find Machining Information for “Facing” by its GMF ID
Find all needed G&M Codes by numbers in “G&M Code” Column
Required GMF Parameters DB ID 1 2 3 :
Machining Information DB ID
Fixture
Tools
Cutting Information Speed Depth
1 2
11 11
21 22
1000 900
9
12
22
27 :
11 :
13 :
Feed
GMF ID #
.2 .2
.5 .5
1 1
1500
.2
.6
2
850 :
.175 :
.45 :
7 :
Find Tool Path Step information for “Facing” by its GMF ID
Tool Path Step Information DB ID 1 2 :
G & M Codes
ID # 1
Step Number 1
2
1
1+2+1+1+1
GMF
:
:
DB ID 1 2
Name G00 G01
3
M06 :
Description
1+2+1+1
:
:
G & M Code Table Parameter 1 Description Rapid positioning Position at controlled rate Tool Change :
Target Position Feed Rate
Parameter 2
…
Target Position
: :
Figure 2. Structure of relational database (DB)
: :
:
FBCP for TURNING We have implemented a proof-of-concept FBCP System for turning9 and describe and demonstrate it in this section using the simple turned part. The Turning FBCP System is implemented through Java Applets to allow Internet integration. By publishing through a web page, this system can be accessed by anyone who has applet-enabled Internet browser in his/her machine. The FBCP System is an Internet design and manufacturing enabling tool. By selecting features in sequence, the machining process plan is generated automatically by the rule-based reasoning system. The G&M code is also generated and then can be used to control a physical CNC system. One of the strengths of the FBCP’s graphical interface is its display of a real-time visual simulation of the turning process results as the code is generated.
Interactive User Interface An effective user interface is a critical element to the success of any interactive system. Overall we wish to create an environment in which the user selects machine features from which to build part geometry, inputs relevant final part geometry information, and is provided with enough feedback to verify the outcomes of the choices. The interface (Figure 3) is divided into six areas as follows: Area 1. Display of concurrent cutting parameters such as spindle speed, feed speed, etc. Area 2. The result of each cutting process will be shown here. Area 3. Grouped machine features are displayed here. Area 4. The resulting G&M code will be shown here. Area 5. The simulation of each cutting process will be shown here. The user can see how the part is fixed, what kind of machine tool is used and how the tool moves actually clearly. Area 6. The parameters required for each GMF appear in this area. The procedure for using the FBCP interface is shown below: Step 1. Begin a new process by pressing “Begin a New Process” button in Area 3.
AREA 1: OPERATION PARAMETERS
AREA 3: GMF CLASSES AREA 2: DISPLAY OF FEATURE CHOICES
AREA 4 : CNC CODE OUTPUT
AREA 5: MACHINED PART SIMULATION
AREA 6: PROMPT AREA FOR GMF REQUIRED PARAMETERS
Figure 3. Turning FBCP’s graphical interface
Step 2. Step 3.
Step 4.
Step 5. Step 6.
Choose a stock to begin with by pressing “Stock” button in Area 3. The corresponding parameters (in this example, they will be the diameter and the length of the cylinder) for user to input will appear in Area 6. After inputting these parameters, press button “OK”. The resulting stock will appear in Area 2. Choose a feature as needed in Area 3. The corresponding parameters for the feature will appear in Area 6. After inputting values for these parameters, press the “OK” button. The resulting part will appear in Area 2. The simulation of corresponding machining process will appear in Area 5. (The simulation routine is not yet implemented.) The concurrent machining parameters will appear in Area 1. The result G&M code to produce the selected machine feature will appear in Area 4. Repeat step 4 until the desired part is obtained. Press “finish” button. The resulting G&M code will appear in Area 4.
Turned Part Example Figure 4 displays a summary of the output of a designer’s interaction with the FBCP system to create a turned part. It displays the list of process steps developed by the user through interaction with the FBCP system. Immediately to the right of the process step is the output of the FPCP’s progressive part display window that shows the progression of the stock into the final turned part. Also displayed is the CNC code generated by the FBCP System. We draw your attention to the small arrows appearing in the series of progressive machining operation displays in the middle of Figure 4. These arrows indicated the depth of cut for each step in a multi-pass cutting process. The FBCP System recognizes the need for multiple passes to perform the process input by the user and automatically calculates the number and parameters of the intermediate cutting passes. The result is accurate CNC code generation.
DISCUSSION The proposed FBCP system presents advantages to the user interested in generating machining code without becoming a specialist. The system makes it easy to generate G&M code, because the input sequence determines the machining process. At each step of the process, the user is given visual feedback to verify their choices. The user never needs to review CNC code. Instead, the user can verify the results of each machining process as it is selected. The FBCP system integrates the user’s creative ability and the machine’s logical reasoning ability. Improvements to the FBCP system include incorporation of error checking and recovery. There is no provision in the current system to check the reasonableness of the parameters input by the user. Included an error checking process with a valid range of acceptable parameters would strengthen the system. In the present implementation, a user must restart the generation process if an error in machining feature selection is discovered. A simple backtracking routine controlled by the user can be added to the system. Exploration continues in the following areas: • Implementing JAVA3D for an effective simulation of machining processes, • Incorporating case-based-reasoning can increase the efficiency of code generation for the most standard features, • Providing an interface for users to input new features, and, • Integrating CAD, CAPP, and CAM processes using a standard data format (STEP).
80
45
10
20
30
40
20
200
Desired Part Geometry
SYSTEM INPUTS FROM USER
Begin
PROGRESSIVE DISPLAY OF OPERATION RESULTS
Choose the stock
G97 S 1500G&M G90 M13 G70G00 X-45 Z240 G95 T0101 M06 G96 S400 R5000
CODE
M06G00 X-35 Z210 G01 F150 X0 G00 Z220 G00 X-35 G00 X-35 Z200 G01 F150 X0 G00 Z210 G00 X-35
Facing
M06G00 X-20 Z210 G01 F150 Z0 G00 Z-10 G00 X-30 G00 Z210
Straight Cut
M06G00 X-15 Z210 G01 F150 Z20 G00 X-30 G00 Z210
Left Cut1
M06G00 X-10 Z210 G01 F150 Z100 G00 X-25 G00 Z210
Left Cut2
M06G00 X-25 Z150 G01 F150X-5
Cut Off
G00 X-25
End
Figure 4. FBCP output for sample turned part Effective global manufacturing enterprises require internet-based tools and technologies to virtually integrate the efforts of customers, designers, and manufacturers who work in separate office buildings or on separate continents. We present the framework for an internet-accessible, featurebased, CNC programming environment. The environment empowers users from different geographical sites to control CNC machining processes via real-time simulations, remote access, and remote manipulation. With proper enabling technologies, the Internet can be the bridge that connects designers, manufacturers, and CNC machines.
CONCLUSION Advances in manufacturing technology are allowing us to reexamine dated strategies to manufacturing and change them into more comprehensive approaches that manifest the spirit of concurrent engineering and make full use of current Internet technology. The FBCP system is structured to allow the user to be a part design specialist and still generate machining process code.
Grouped machine features, a fundamental construct of the FBCP system, are a way to efficiently combine geometric and manufacturing information for real-time processing in an on-line manufacturing tool. FBCP system users are transformed from generalists to specialists by relying on the power of automated tool assistants. The next link is to bring remote specialists together (if only virtually) to fully realize a concurrent engineering environment. With proper enabling technologies, the Internet can be the bridge that connects designers, manufacturers, and CNC machines. We continue to experiment to bring these technologies into reality.
REFERENCES 1. Valentino, J.V. and Goldenberg, J., Introduction to computer numerical control, REGENTS/PRENTICE HALL, Englewood Cliffs, New Jersey, 1993. 2. Bedi, S. and Vickers, G.W., Post processor for numerically controlled machine tools, Computers in Industry, Vol.9, 1987, pp.3-18. 3. Iwata, K., Onosato, M., Teramoto, K. et al., An architecture for form feature modeling for concurrent, cooperative and consistent product design, JSME International Journal, v40, n3, p533-539, 1997. 4. Karadkar, Rajiv B. and Pande, S.S., Feature based automatic CNC code generation for prismatic parts, Computers in Industry, v28, n2, 1996, 137-150. 5. Eskicioglu, H., Davies, B. J., An interactive process planning system for prismatic parts (ICAPP), Ann. CIRP, v.32, 1983, pp.365-370. 6. Smith, Graham T., CNC machining technology volume III: part programming techniques, Technology Research Centre, Southampton Institute, City Campus, East Park Terraces, Southampton SO9 4WW, UK, 1993. 7. Patel, Shilpan, Design features + process knowledge = automated CNC programming, Modern Machine Shop, v67, n6, p78-85, 1994. 8. http://www.glue.umd.edu/~dandan/process.html 9. Djassemi, Manocher, Parametric programming technique for efficient CNC machining operations, Computers & Industrial Engineering, v35, n1-2, p 33-36, 1998. 10. Fenster, Douglas P. and Carrier, T., On the direct programming of CNC milling equipment, Computers & Industrial Engineering, v17, n1-4, pp252-257, 1989. 11. Nakazawa, Hiromu and Sugaya, Isao, Study on human-oriented interface for CNC machine tools, JSME International Journal, v39, n2, p397-403, 1996. 12. Pickett, P.W. and Wang, Jian, An expert system approach to CNC toolpath generation, IEE Conference Publication 398, Oct 3-5, p 5-11, 1994. 13. Naughton, Patrick and Schildt, Herbert, The complete Reference Java 2, Osborne/McGrawHill, Berkeley, California, USA, 1999.