You are on page 1of 6

Refining process logic from CNC part programmes for integrated STEP-NC compliant manufacturing of prismatic parts

X. Zhang, A. Nassehi, V. G. Dhokia, S. T. Newman Department of Mechanical Engineering, University of Bath, Bath, BA2 7AY, UK Abstract Reusing machining process information offers the industry opportunities to improve manufacturing traceability, standardization, quality, and control while enabling savings in cost and time. Rapid product development relies heavily on quick and reliable process planning and knowledge reuse to facilitate the generation of process plans efficiently and effectively. STEP-NC as a STEP compliant standard for CNC manufacturing provides a promising opportunity for knowledge reuse and information sharing across the CAx manufacturing chain from CAD to CNC. However, the widespread use of G&M codes impedes the feedback of shopfloor knowledge. In this research, to capture shopfloor knowhow, a Universal Process Comprehension interface (UPCi) is utilised to comprehend the process plan from lowlevel G&M code programmes written for CNC machines and represent it in a standardised STEP-NC format. In this paper, a novel method is proposed to capture the machining process knowledge from CNC part programmes with UPCi and reuse it on new manufacturing resources. An example part is used as a case study to illustrate the process plan comprehension and how the same process plan can be utilised to manufacture the product using new resources. Keywords: CNC machining; knowledge reuse; process planning 1 INTRODUCTION machines to preserve and expand their market share. It results in a plethora of codes, standards and languages for information exchange in the CAD/CAPP/CAM/CNC manufacturing chain [8]. The result is the overall flow of information in the enterprise is predominantly unidirectional [9]. Data sharing between different resources needs various convertors, post-processors or even human intervention, which requires additional labour, time and cost. According to a study by NIST (National Institute of Standards and Technology), the U.S. automotive sector alone spends one billion dollars per year to resolve interoperability problems [10]. However, previous data, information and knowledge are important commodities for organisations [11]. “The effective utilisation of these ‘commodities’ is increasingly the only way for organisations to achieve and sustain competitive advantage.” Rapid product development relies heavily on quick and reliable process planning. Reusing manufacturing knowledge can facilitate the generation of process plan efficiently and effectively, enabling decreases in terms of cost and time. Due to the current information transfer mechanism, it is difficulty to store and share between different resources. A large amount of effort has been made to capture and reuse the previous knowledge. Most of the previous research has been emphasised on product design and process planning stages [12]. In fact, in manufacturing, shopfloor machining is a knowledge-intensive stage. The operators put a lot of practical know-how into shopfloor part programmes [13] to improve the process plan. For example, the operators of CNC machines can make last-minute changes to a part programme on machine according to their experience. From this point of view, the G&M codes are the final and most precise representation of a process plan. Unfortunately, there is still no effective and automatic approach to capture and reuse this shopfloor knowledge from previous part programmes due to the unidirectional information flow [9]. Researchers [14, 15] have tried to translate part programmes directly and use them on new manufacturing resources. However, in both of these works, it was assumed that the two different machines involved in exchanging part programmes have the same physical axis configuration and use cutting tools with the same diameters and cutting heights. Going beyond any of these assumptions would require the toolpath to be generated again in the CAD/CAM systems [16].

Computer Numerical Control (CNC) technology can now be found in most manufacturing enterprises. Compared with CNC machines of the first generation in the 1950s, the modern CNC machines have equipped with many advanced capabilities such as multi-axis control, adaptive control, error compensation and multi-process manufacture [1]. Although there are many remarkable enhancements in CNC machines, the programming language for CNC machines is still based on the traditional, axis movement description programming language, ISO 6983 [2], usually referred to as G&M codes. With the versatility of CNC, the programming task becomes increasingly more difficult [3]. For precise and complex jobs, it is impractical to program at the shopfloor. This makes Computer Aided software (CAx) tools such as Computer Aided Design (CAD), Computer Aided Process Planning (CAPP), Computer Aided Manufacturing (CAM), a necessity for efficient generation and verification of a part programme. These systems together with CNC machines form a CAx manufacturing chain. In the manufacturing chain, process planning plays a critical role, linking design and manufacture. The traditional way to solve process-planning problems is to leave it to the manufacturing experts. They take part design and available resources into account and make a suitable process plan to produce the part. This is time consuming and, usually, not consistent as the quality of the process plan depends on the planners’ experience. Although the study of CAPP started as early as 1960s [4], no viable off-the-shelf solution is yet available that can be easily or widely implemented in industry [5, 6]. Process planning still relies heavily on human experience. In some companies, the process plan is still developed manually. Consequently, a successful process plan is quite essential, typically CAx dependent and cannot be transferred across the CAx chain. There is a need to capture and reuse the knowledge contained in a process plan. Since, as hardware advances, the programming standard, ISO 6983, does not provide a corresponding integration approach, machine manufacturers have been adding their own proprietary instructions to the standard [7]. The same situation has happened in CAx systems. CAx vendors employed proprietary standards for the enhancements that they introduced in their new products, to support the new capabilities of the latest generation of CNC

4th International Conference on Changeable, Agile, Reconfigurable and Virtual Production (CARV2011), Montreal, Canada 2011

To solve the information sharing problem, the STEP-NC standard has been developed since the late 1990s [9]. With STEP-NC replacing G&M codes at the shopfloor, the shopfloor changes and know-how can be captured and reused [17]. It was also believed that the implementation of STEP-NC could be the basis for open and adaptable manufacturing [7] and effectively solve the problems manufacturing is facing due to the low level of information in CNC part programmes. However, implementation of STEP-NC has been a huge task due to the inherent complexity of STEP-NC. Furthermore, in order for it to make economic sense, a majority of CAx vendors should make an effort to adopt this new data model. To this day, the commercial attention to STEP-NC has been limited and most of the standard’s potential for interoperability remains untapped [9]. As a practical solution, Nassehi et al. [8] depicted a interoperable manufacturing scenario where different components of the CNC manufacturing chain can exchange information with one another regardless of their native standards. A Universal CNC manufacturing platform is presented with a manufacturing data warehouse. As an example, an interoperable CAD/CAM system has been developed to realise the feature level interoperability between Siemens and Heidenhain machines. This platform needs wide rang of interfaces to communicate with various manufacturing resources. Shin et al. [13] proposed a conversion algorithm from G-code based part program into STEP-NC file. To the authors’ knowledge, it is the only reported work on the same topic of this research, but only for turning operations. For milling operations, the authors put forward a process comprehension method to capture shopfloor knowledge [16]. In this approach, cutting tool, raw workpiece information and G&M part programmes are used to comprehend the original process plan information. A Universal Process Comprehension interface (UPCi) has been developed. In this paper, the workflow of UPCi is introduced. An example part is designed to illustrate how UPCi can be used to comprehend process plan knowledge and reuse the knowledge to facilitate the production with new resources. 2 PROCESS CAPTURE COMPREHENSION FOR KNOWLEDGE

between various G&M code formats, they are still all based on the ISO 6983. They just use different commands to program the tool movement and switch operations of the machine functions. In this research, a semantic meta-model method is used, which abstracts different program formats into a general conceptual model. In this method a XML template has been designed to describe these different command formats and map them to the CNC activity model. The mapping rule between the meta-model and syntax of a G&M code dialect can be defined in the pre-designed template of the XML file, which connects the meta-model and the dialects, as shown in Figure 1. To support a range of various CNCs, a “mapping dictionary” is needed, containing different XML descriptions of various programming dialects. The entries of this dictionary are vendor specific syntax maps between the CNC meta-model and various G&M dialects. This kind of map is written according to the generic template of XML file. As the dictionary can be extensible by adding new entries, even for other toolpath based programming languages, it is possible to be accommodated only with a XML description of their syntax. Hence, the mapping dictionary enables an extensible architecture of UPCi.

As CNC vendors adopt their own programming dialects, programmes (post processors) are needed for every pair of CAM/CNC configuration to translate the processes logic contained in the CAM system to part programmes appropriate for a specific CNC machine tool. This downstream flow of information and the inherent restructuring of the data are encompassed in the post processing activity. The authors propose the name process comprehension for the opposite of the above process as it is their belief that reverse post processing does not capture the essence of the operation. Process comprehension is essentially restructuring the combined manufacturing information in a CNC part programme into a high-level process plan and the associated resource information. In order to carry out process comprehension, sophisticated information-rich systems should be used to convert the information back. However, the work to develop loads of processors for each CNC/CAM is tremendous and, more importantly, not an efficient way. In this research, a Universal Process Comprehension interface (UPCi), which can be considered as a universal “process comprehension engine”, has been developed to support CNC machines regardless of their programming dialects. 2.1 Abstract CNC activity model: a meta-model for CNC programming

Figure 1 Connection between CNC activity model and G&M codes dialects XML has been chosen to be the description language for its excellent design advantages such as human-legible and reasonably clear, easy to be processed, wide support and straightforwardly usable over the Internet [18]. For this research, using XML gives the author the ability to define the meaningful custom-tailored tags that is engineer-legible. Another advantage of XML is its characteristic of easy transportation over the internet for that the ability of sharing and exchanging information over the internet straightforwardly becomes the prerequisite for the newly emerged manufacturing technologies [19]. 2.2 Feature recognition After the G&M codes converted into the abstract CNC meta-model, the next stage is to recognise the features and operations from these information. At this stage, some manufacturing hints are used to divide the part programme into several sections, representing different manufacturing features or operations. For different features

To achieve the goal of being universally applicable, an abstract CNC activity model is proposed. It is an abstract meta-model for different CNC controllers. Although there are lots of differences

or different operations of the same feature, usually, different tools or different feedrates are employed. It is very rare to use the same tool and same cutting parameters to produce a part from the beginning to the end. These tool changes and feedrate alterations can be used to separate G&M codes into several sections. For each section, the coordinates of toolpath and tool radius are used to calculate the outer boundary. This boundary information, together with cutting tool type and the geometry of the raw workpiece, is used to identify the feature type [16]. For example, when an endmill cutting tool is used, it might be for a pocket, step, planar face or slot. Thus there is a need to compare the outer boundary to the workpiece edges. When the feature boundary is within the workpiece edges, the feature should be a pocket (note: a slot is considered as a special type of pocket). When the feature boundary intersects with workpiece edges, it should be an open pocket or a step dependent on the intersecting situation. Otherwise it should be a planar_face. If it is a pocket, for a rectangular one, three dimisions are needed: length, width and depth. The depth can be easily figured out by comparing the toolpath positons. The lowest cut should be touching the bottom of the pocket. The length and width can be figured out by the outter boundary of the toolpath and the tool diameter. For a toolpath based part program, it is practical to get the coordinates of the four corners and calculate the length and width. As shown in Figure 2, if

the pocket corner radius equals the tool radius, the points with minimum and maximum coordinates value of X, Y axis (supposed to be XY plane) are the corners of the pocket. When the corner radius is greater than the tool radius, the circular interpolations can be used to figure out the corners. First calculate the cnetres of the circular feed moves, then compare them in the same way to find the corners. By enlarging the rectangular shape specified by the four corner points the boundary of the pocket can be calculated. Hence, it is adequate to calculate the outline of the pocket with the part program and tool information. If the pocket outer boundary interacts with the workpiece boundary, then it is a open pocket. Once the feature is identified, the operations associated with the feature can be narrowed to a smaller scope. For a pocket, it might be a side_milling (through pocket) or bottom_and_side_milling (blind pocket). Consequently, operation types can be identified according to the feature characteristics. For the final stage of process comprehension, a previously developed software platform for manipulating STEP-NC data entitled the Integrated Platform for Process Planning and Control 3 (IP AC) [20], is used to manipulate and generate STEP-NC data. This platform provides a a fully encapsulation of STEP-NC data in an object oriented manner. Then, the process plan is derived and stored in a standardised representation.

(a) round corner radius = tool radius

(b) round corner radius > tool radius

Figure 2 How to get the outline of a pocket

Figure 3 IDEF0 view of UPCi workflow [16]


Universal Process Comprehension interface (UPCi)

Based on the process comprehension method, a prototype system of UPCi has been developed. The implementation of UPCi is using the Java programming language in Netbeans IDE. One advantage of Java is its good support of the XML process. The workflow of UPCi is shown in Figure 3. The input of UPCi includes G&M codes, workpiece geometry information and cutting tool information. To understand the G&M codes, a specific G&M schema has been developed and used as a reference dictionary to check and translate G&M codes into the meta-model. In the system, it is a set of Java class objects representing the semantics of G&M codes. With the meta-model data, cutting tool and workpiece geometry information, features can be recognised. The relevant STEP-NC entities including workingsteps, operations, machining strategies can then be derived and created based on the information available. These STEP-NC entities can then be assembled together to generate the standardised process plan by IP3AC. 3 PROCESS COMPREHENSION MANUFACTURING KNOWLEDGE FOR REFINING

research, FeatureCAM (V 16.0) system was used to design the part and generate the part programme. The Fanuc controller based post processor was used during the generation of the part programme for a specific machine, namely a Dugard vertical 3-Axis CNC machining machine with the Fanuc 18i controller. The part programme, used on the Fanuc machine with updated parameters, is then used as the input of UPCi and converted into machine independent meta-model referring the controller’s programming schema, represented by a set of Java objects in UPCi. After this translation, UPCi recognises and reconstructs the geometry of each feature and its operation(s) information based on the toolpath (as shown in Figure 5 (b)), cutting tool information and raw workpiece geometry etc. These features and their associated 3 operations were then combined in a workplan. IP AC is used then to generate the STEP-NC file based on this STEP-NC data. The STEP-NC code, generated as the final output of UPCi shown in Figure 6, is semantically identical to the code in ISO 14649-11 with the additional data related with the slot. When the STEP-NC representation of the process plan is ready, an interoperable CAD/CAM system [18] is used to convert the standardised process plan into a feature based part programme for the Siemens machine. The MPF file generated from the CAD/CAM system is shown in Figure 7. This part programme is then validated in the Shopmill, a Siemens shopfloor CAM system on Siemens controller (Figure 8). 4 CONCLUSIONS This paper proposes a novel approach to reserve shopfloor knowledge and reuse it with new manufacturing resources. UPCi can help to capture shopfloor knowledge from NC part programmes and store this knowledge in a standardised representation of process plan. The Meta-model mechanism enables UPCi to support various programming dialects. UPCi provides an effective way to maintain information sharing within manufacturing industries and help them to effortlessly accumulate manufacturing knowledge to stay competitive in the global market. Furthermore, this is also an efficient approach to generate a refined process plan to facilitate rapid and quality production based on current manufacturing knowledge. It is especially useful for the legacy parts with sophisticated part programmes and no proper process plan data.

Process comprehension is an effective way to capture the shopfloor knowledge and comprehend the process plan from the low-level part programmes. The process plan generated from process comprehension is encapsulated in a STEP-NC file. This standardised representation of the process plan can, in responses, facilitate the reuse of this knowledge. With more and more system accepting SETP-NC, this knowledge can be widely used in many other system for various purpose including process planning, cost estimation, regeneration of machine specific code, product data management etc. In this research, the possibility to reuse the updated process plan on new manufacturing resources is examined. A case study is used to illustrate and validate this proposition. The validation method used is shown in Figure 4. In this case study, a sample part is designed to validate the proposed research method. This part, as shown in Figure 5 (a), is designed based on the sample part of ISO 14649-11 [21]. Compared with the original one, this part has one more feature: a slot. The typical process for CNC manufacturing is used to design a part in CAD/CAM system and generate the part programme for a CNC machine using a corresponding post processor. In this
Legacy CAx chain for an existing part

Part design



Part FANUC G&M codes with parameters updated at shopfloor


STEP-NC data Interoperable CAD/CAM SIEMENS MPF file SIEMENS CNC Machine


Figure 4 Validation method of UPCi for manufacturing knowledge reuse

(a) Sample part designed in CAD/CAM system

(b) Toolpath information extracted from G&M codes

Figure 5 Design view and toolpath information of the sample part



N5 E_HEAD(4095,0.,0.,0.,120.,100.,-52.5,71,17,30.,100.,0,0,6,);*RO* N10 E_MI_PL("32mmFacemill","8mmSlot",1,5000.,1,10000.,1,9,0,90,-2.5,90,2.5,0.,0.,90,0.,90,120.,91,100.,91,50.,1);*RO* N15 E_SL_LON(4,0,0,"8mmSlot","20mmSlot_c",1,1200.,1,8000.,1,1,250.,1,0.,90,-6.,90,2.,1,11.,90,30.,90,40.,8.,90.,0.,0.,0.5,0,0);*RO* N20 E_PO_REC(4,0,0,"20mmSlot_c","20mmDRILL",1,1261.,1,3153.,1,1,250.,1,0.,0.,90,-30.,90,15.,1,30.,90,15.,90,80.,40.,10.,0.,1.25, 0.,8.,3.,1.,60.,0,1);*RO* N45 E_PO_REC(4,0,0,"20mmSlot_c","20mmDRILL",1,2328.,1,4851.,1,2,250.,1,0.,0.,90,-30.,90,15.,1,30.,90,15.,90,80.,40.,10.,0.,1.25, 1.25,8.,3.,1.,60.,0,1);*RO* N25 E_DR_PEC(1,0,0,"20mmDRILL","22_RDRILL",1,364.,1,1212.,1,0,-30.,90,20.,1.,20.,0.005,1);*RO* N30 _E_P001: E_PS_SEQ(1,0,0,0.,90,60.,90,80.,90,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,1);*RO* N35 E_DR(1,0,0,"22_RDRILL","",1,727.,1,551.,1,-30.,0,0.05,1);*RO* N40 _E_P002: E_PS_SEQ(1,0,0,0.,90,60.,90,80.,90,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,0.,0,2);*RO* M30 ;#SM;*RO* Figure 7 Siemens part programme Generated from STEP-NC process plan file


Brunnermeier, S.B. and Martin, S.A. (1999): Interoperability cost analysis of the US automotive supply chain, in NIST Planning Report 99-1. National Institute of Standards and Technology: Gaithersburg, MD. Hicks, B.J., Culley, S.J., Allen, R.D., and Mullineux, G. (2002): A framework for the requirements of capturing, storing and reusing information and knowledge in engineering design, in: International Journal of Information Management, Vol. 22, No. 4, pp. 263-280. Zheng, L., Dong, H., Vichare, P., Nassehi, A., and Newman, S.T. (2008): Systematic modeling and reusing of process knowledge for rapid process configuration, in: Robotics and Computer-Integrated Manufacturing, Vol. 24, No. 6, pp. 763772. Shin, S.J., Suh, S.H., and Stroud, I. (2007): Reincarnation of G-code based part programs into STEP-NC for turning applications, in: Computer-Aided Design, Vol. 39, No. 1, pp. 1-16. Liu, Y., Guo, X., Li, W., Yamazaki, K., Kashihara, K., and Fujishima, M. (2007): An intelligent NC program processor for CNC system of machine tool, in: Robotics and ComputerIntegrated Manufacturing, Vol. 23, No. 2, pp. 160-169. Schroeder, T. and Hoffmann, M. (2006): Flexible automatic converting of NC programs. A cross-compiler for structured text, in: International Journal of Production Research, Vol. 44, pp. 2671-2679. Zhang, X., Nassehi, A., and Newman, S.T. (2011): Process Comprehension for Interoperable CNC Manufacturing, in: 2011 IEEE International Conference on Computer Science and Automation Engineering. Vol. 4, pp. 225-229, Shanghai, China. Weck, M., Wolf, J., and Kiritsis, D. (2001): STEP-NC - The STEP compliant NC Programming Interface, in: International Intelligent Manufacturing System Forum, Ascona, Switzerland. W3C Recommendation. (2008): Extensible Markup Language (XML) 1.0 (Fifth Edition). Available from: Xu, X.W. (2006): STEP-NC and function blocks for interoperable manufacturing, in: IEEE Transactions on Automation Science and Engineering, Vol. 3, No. 3, pp. 297308. Nassehi, A., Liu, R., and Newman, S.T. (2007): A new software platform to support feature-based process planning for interoperable STEP-NC manufacture, in: International Journal of Computer Integrated Manufacturing, Vol. 20, No. 7, pp. 669-683. ISO 14649-11. (2002): Industrial automation systems and integration - physical device control - data model for computerized numerical controllers. part 11: Process data for milling, International Standards Organisation (ISO).



[13] Figure 8 Simulation of the Siemens part programme 5 ACKNOWLEDGEMENTS [14] The work reported in this paper has been undertaken as part of the research work in the EPSRC Innovative Manufacturing Research Centre at the University of Bath (grant reference GR/R67507/0). The authors gratefully acknowledge the support and express their thanks for the advice and support of all the centre staff concerned. 6 [1] REFERENCES Nguyen, V. and Stark, J. (2005): STEP-compliant CNC Systems, Present and Future Directions, in: Advanced Design and Manufacturing Based on STEP, Springer, pp. 215-231. ISO6983-1. (1982): Numerical control of machines—program format and definition of address words. Part 1: data format for positioning, Line motion and contouring control systems, International Standards Organisation (ISO). Xu, X.W., Wang, H., Mao, J., Newman, S.T., Kramer, T.R., Proctor, F.M., and Michaloski, J.L. (2005): STEP-compliant NC research: The search for intelligent CAD/CAPP/CAM/CNC integration, in: International Journal of Production Research, Vol. 43, No. 17, pp. 3703-3743. Niebel, B. (1965): Mechanized process selection for planning new designs, in: ASME paper, No. 737. Denkena, B., Shpitalni, M., Kowalski, P., Molcho, G., and Zipori, Y. (2007): Knowledge Management in Process Planning, in: CIRP Annals - Manufacturing Technology, Vol. 56, No. 1, pp. 175-180. Xu, X., Wang, L., and Newman, S.T. (2011): Computer-aided process planning - A critical review of recent developments and future trends, in: International Journal of Computer Integrated Manufacturing, Vol. 24, No. 1, pp. 1-31. Xu, X.W. and Newman, S.T. (2006): Making CNC machine tools more open, interoperable and intelligent - A review of the technologies, in: Computers in Industry, Vol. 57, No. 2, pp. 141-152. Nassehi, A., Newman, S.T., Xu, X., and Rosso, R. (2008): Toward interoperable CNC manufacturing, in: International Journal of Computer Integrated Manufacturing, Vol. 21, No. 2, pp. 222-230. Newman, S.T., Nassehi, A., Xu, X.W., Rosso Jr, R.S.U., Wang, L., Yusof, Y., Ali, L., Liu, R., Zheng, L.Y., Kumar, S., Vichare, P., and Dhokia, V. (2008): Strategic advantages of interoperability for global manufacturing using CNC technology, in: Robotics and Computer-Integrated Manufacturing, Vol. 24, No. 6, pp. 699-708.






[4] [5]