WIRE EDM MACHINING SIMULATIONS BASED ON STEP-NC PROGRAM

Preliminary notes This paper presents the possibilities of applying a new method of programming based on STEP-NC standards, which was developed as an alternative to the G code. The possibilities of application in the field of machining simulation and verification of the program before machining on the wire electrical discharge machine are discussed. The paper shows the possible methodology for simulation and verification of programs based on the STEP-NC using IDEF0 diagrams, as well as links between the software programs STEP-NC Machine and CAD/CAM system. The presented methodology is verified by the test workpiece machining, based on the STEP-NC program.


Introduction
Virtual machining simulation is very important in modern manufacturing.This paper considers the Wire electrical discharge machining (WEDM) machine simulation.The WEDM is a widely accepted nontraditional material removal process and this is a specialized thermal machining process capable of accurately machining workpiece with varying hardness or complex shapes, which have sharp edges and are very difficult to machine by conventional chip removal methods.During the WEDM process, the material is eroded in the front of the wire and there is no direct contact between the workpiece and the wire.The material removal mechanism of WEDM involves the erosion effect produced by the electrical discharges (sparks) between the cathode (wire) and anode (workpiece).The only requirement is that both wire electrode and workpiece materials are electrically conductive [1] to [4].
The paper considers the possibility of programming and machine simulation for the available 2-axis WEDM machine tool, based on a new method of programming by the protocol STEP-NC (Standard for Product Model Data Exchange for Numerical Control) [5].For more than half a century machine tool programming was based on G code, (ISO 6983), which also applies to the WEDM machines.Machine tool programming using G code is characterized by a low level of machining information content.This low level information describes elementary actions and tools trajectories, strongly reducing possibilities at the CNC level.It also breaks the CAD-CAM-CNC numerical chain, and obtaining feed back from the shop floor is hardly possible [6] and [7].It is necessary to prepare the tool path for each type of CNC machine tools, in this case for WEDM machine, individually using the appropriate postprocessor.
Nowadays, a new standard, informally known as STEP-NC [5] and [8], is being used as the basis for development of the next generation of CNC controller for a new generation of machine tools.This new standard includes ISO 14649 and ISO 10303 AP 238.In the field of machine tool programming an open challenge is a new programming method using standard known as STEP-NC.The development of a new method of programming has started [5] to [11], but it is still an unfinished work.The subject of this paper is machining simulation based on the STEP-NC program [12] and [13], using software to verify the program before machining on CNC machine tool.This is discussed in two environments: STEP-NC Machine [8] and CAD/CAM system PTC Creo [14].
The STEP-NC is the result of more than a decade long period of international effort to replace G code (ISO 6983) with a modern associative language that connects the CAD design data used to determine the machining requirements for an operation with the CAM process data that solve those requirements [15].
The method of programming using the STEP-NC is an object-oriented view of programming in terms of manufacturing features, instead of direct coding of sequences of the axis motions and tool functions as defined in ISO 6983 [16].Classical programming is still the most commonly used way of programming and object-oriented programming has not been introduced to the full extent.However, these two methods are simultaneously used, as illustrated in Fig. 1.
Fig. 1 shows the comparison of current G-code programming method (ISO 6983) and a new STEP-NC high level programming method (ISO 14649).The STEP-NC provides new opportunities for CNC controller to support a high level of information from design.It allows bi-directional flow of data between CAD/CAM and CNC machine tools without losing information.The STEP-NC does not describe the tool trajectories for specific CNC machine tool as G code does, but it provides a machining feature-based data model.A STEP-NC program can be Technical Gazette 23, 6(2016), 1831-1838 used on various WEDM machine tool controllers, which is support to the new method of programming [6].The STEP-NC data structure for WEDM is based on ISO 14649-13 (Fig. 2).The data model contains the following main elements: (i) process plan (working steps, operations, strategies, …), (ii) geometry of the final part, (iii) technology parameters, machine functions, wire information, etc. Machining simulation of the machining process created in this paper includes the simulation of machine operation based on the generated program in CAD/CAM system, and in software STEP-NC Machine [12].Machining simulation is important because it: (1) prevents CNC machine collisions; (2) shows machine operators what to expect from new programs; (3) increases machining safety; (4) enhances presentations and documentation with AVI simulations; (5) provides training and education without using production time (or risking a crash of the real machine).
Machining simulations are divided into two categories: geometric and physical simulation.Geometric simulation is used to graphically check whether the tools (wire) interfere with the fixture, workpiece and WEDM machine, damage the workpiece, or leave excess material behind.As the name implies, physical simulation of an NC machining process aims to reveal the physical aspects of a machining process [7].The subject of this paper refers to the geometric simulation only.
The rest of the paper is organized as follows.In section 2, the scenario for applying STEP-NC is presented.Methodology for STEP-NC based machine simulation is shown in section 3.In section 4, WEDM machining simulations are presented.Machining experiment, based on the STEP-NC program is presented in section 5.

Scenario for applying STEP-NC
At the moment, this new method of programming based on STEP-NC cannot completely be used, because the resources for its development are owned by several research centres.Operational work on the protocol STEP-NC can be followed on the website of the company STEP Tools [8].This paper considers two possible scenarios (SC1, SC2) for indirect application of this method of programming [13], in this case on the example of a WEDM, Fig. 3.

Figure 3 Scenarios for the application of STEP-NC programming
First of all, we can use the original STEP-NC program, postprocessing it into G code and executing on the machine tool (Scenario SC1).Secondly, we can create STEP-NC program using the CAD/CAM system and software STEP-NC Machine (scenario SC2).
Scenario SC1 is based on the original STEP-NC program and starts in the software STEP-NC Machine environment, where it is possible to execute postprocessing in G code for the machines that cannot interpret STEP-NC programs.For the scenario SC1, it is possible to translate the design of machining a single part in the STEP-NC format into the step format of the workpiece, preform and tool path (Cutter Location File CLF), which can be loaded into the existing CAD/CAM systems, where machining and postprocessing simulation in G code is performed.The CAD/CAM system uses configured postprocessor to generate G code for the WEDM machine tool.
In the scenario SC2 a common CAD/CAM system is employed for modelling the workpiece, preform, fixtures, tools, and tool path is generated (CLF).Afterwards, a referent models of workpiece, preform, fixtures, tools, and generated tool path, in the STEP format are loaded into the software STEP-NC Machine, where the program can be saved in the format *.stpnc, that is, *.238.The scenario SC2 begins in the CAD/CAM system where a complete machining technology is prepared, exported in the STEP and CLF formats, and loaded into the STEP-NC Machine, when final formation of the stpnc file is done.This file can be a basis for performing simulations on a WEDM machine, as well as for postprocessing in G code, for the machines that do not yet support STEP-NC control.

Methodology for STEP-NC based machining simulation
In this paper, functions of STEP-NC based machining are described by using the IDEF0 diagram [18].The special case of one box IDEF0 context diagram, containing the top level function being modelled with its inputs, controls, outputs and mechanisms, is shown in Fig. 4. The IDEF0 is a method designed to model the decisions, actions, and activities of an organization or system.It is useful in establishing the scope of an analysis, especially for a functional analysis [12] and [13].The IDEF0 is used to produce a "function model".The function model is a structured representation of the functions, activities or processes within the modelled system or subject area.
The single function represented on the top-level context diagram may be decomposed into its major subfunctions by creating its child diagrams.Each child diagram contains the child boxes and arrows that provide additional detail about the parent box.The child diagram that results from the decomposition of a function covers the same scope as the parent box in details.
Top level child diagram А0 describes basic flow of activities and it is illustrated in  The application of this methodology is presented in section 5. Two examples of machining are used, one for each scenario.

WEDM machining simulations
Machining simulation is very important in modern manufacturing [19,20].The subjects of our study are the two types of machining simulation: (i) WEDM machine simulations in CAD/CAM systems, (ii) WEDM machine simulation in STEP-NC Machine.
The first idea presented here is off-line WEDM programming by using standardized CAD/CAM system [1], and the second idea is to prepare the environment for programming WEDM on the basis of a new method for programming referred to as STEP-NC with operating machine simulation, when it is working by the STEP-NC protocol-based program.

WEDM machining simulations in CAD/CAM system
The configured virtual WEDM machine is used for the simulation of tool path generated in CAD/CAM system, which is important in order to: (i) configure the off-line programming system, (ii) verify program before machining, (iii) detect collision during program execution [21].
The WEDM machine Ewis was set up at the Faculty of Mechanical Engineering (University of Belgrade), Fig. 6.We should pay attention when setting up a workpiece which must be within the limits of the machine workspace.If the workpiece is not within the workspace, the error will occur because the tool cannot achieve the programmed trajectory.
The WEDM machine in Fig. 6 is fully modelled in the CAD/CAM system (PTC Creo) [14], with all kinematics joints, in order to be able to include a virtual machine model in machine simulation, Fig. 7, as shown in detail in [1].
The WEDM machine simulation by running the program is possible due to the application of machine mechanism modelling with all kinematic connections between the components [21].This allows the motion of a virtual model as a system of rigid bodies.Fig. 7 shows a detailed virtual model of WEDM machine mechanism with all kinematic relationships between moving components being defined.Connection slider is used for the movement of two sliders (X, Y) [1].This assembly enables the motion of models in the range defined for each connection that is of particular importance for the identification of possible collisions during the work of mechanism.Machining simulation of a virtual model allows motion of movable segments, with the wire at the end.On the screen, one can see the wire path which is a result of the execution program, obtained by programming using the PTC Creo CAD/CAM system.The machine is programmed in the format of the program, which is based on the G code.
Upon the programming completion, verification of the CL-file is achieved by simulating the wire tool path.
During the wire path simulation, a complete CAD model of virtual machine can be included into the simulation, with Machine play option, in CAD/CAM system.The completed wire path simulation can be simulated by using rendered solid model of the machine, including fixtures and workpiece.An example of verification by the WEDM machining simulation in the CAD/CAM system PTC Creo is shown in Fig. 7.

WEDM machining simulations in STEP-NC Machine
In the absence of control that can interpret STEP-NC program, this section demonstrates how to configure a virtual WEDM machine, with a capacity of machining simulations when the machine operates using the program obtained based on the STEP-NC protocol.
• Virtual WEDM machine is able to interpret the STEP-NC program in the software STEP-NC Machine environment.To load the machine in the STEP-NC environment, it is necessary to follow the next procedure: Prepare a CAD model of the WEDM machine; • Make an export model of the machine in the STEP format by the protocol AP203 or AP214.• Prepare XML file: (i) machine name, (ii) control algorithm, (iii) name of the STEP file machine, (iv) description of the machine base structure, which is stationary, (v) description of tool side structure, (vi) defining placement location for tool, (vii) description of workpiece side structure, (viii) defining placement location for workpiece, (ix) description of NC axes and their feeds.An example of the XML file fragment for WEDM machine description, with comments and illustrations is given in Fig. 8.In order to correctly create the XML file structure and the description of the assembly components that are loaded in the machine model for the needs of simulation, the software ST Viewer is also used to define geometry shape_eid for each part and face_eid for corresponding surfaces.Three elementary entities can be distinguished in a structure: machine stationary components (base, control unit, generator), chain targettool and chain target-workpiece.Movable sliders are placed here on the side of the tool for moving along X and Y axes with feeds of 250mm each.Moving along the third Z axis does not exist, because it is the WEDM machine with two control axes, and consequently (z axis min=0, max=0).The third axis must be also defined since the algorithm for 3-axis serial kinematics is used.Placement location for workpiece is defined with respect to a specified coordinate system of the machine from the erozimat_sklop_asm.stpfile, Fig. 9.
Virtual machine does not need to include all existing components of the original model, so the virtual model is simpler and it is more easily and quickly loaded.
Thus prepared virtual WEDM machine can be loaded in the STEP-NC Machine environment, where it will appear as a new machine in a dropdown menu of Machine Tool, Fig. 10.In the STEP-NC environment there has not been any machine for WEDM to date.For the machine thus figured, individual motion of axes is possible as well as offsetting of the placement location for workpiece in the machine workspace.Upon selecting the machine from the menu, it is loaded in the STEP-NC Machine environment and can execute STEP-NC programs.This is of importance for training in a new method of programming, because it is now possible to check STEP-NC programs by simulating work on a virtual machine.Virtual simulation allows off-line programming with verification and testing on a remote site without machine engagement.Working in the virtual environment is also suitable for training and education in programming of such manufacturing systems.

Machining experiment
The aim of machining experiments was to test the methodology for programming and simulation for WEDM based on STEP-NC standards.The PTC Creo 2.0 and STEP-NC Machine were used for machining simulations and to prepare the program for machining.After the simulation process is completed, the postprocessing follows.The special postprocessor needs to be configured for WEDM machine tool Ewis by using the postprocessor generator from the CAD/CAM system PTC Creo, and STEP-NC Machine.The G code for a given WEDM machine tool is specific in a way that the coordinates X and Y are in microns.
Verification of the above scenarios using the STEP-NC is realized through two examples.The first example refers to the machining benchmark workpiece based on the original STEP-NC program according to ISO 10303 AP238, Fig. 11a and Fig. 12.The second example has been done for scenario SC2, Fig. 11b and Fig. 13.For the experiments we used the resources of the Faculty of Mechanical Engineering (University of Belgrade), WEDM machine Ewis.The minimum machinable feature for WEDM depends on wire diameter, wire tension, wire guiding, thickness and kind of material sheet and the skills of the operator to program it correctly [22].In the experiments for each scenario, we used the wire electrode which is made of brass (diameter 0,30 mm), and workpiece material from aluminum and steel.Preparations for machining programs included both scenarios for the possible application of programming by applying STEP-NC standard.One example was prepared for each scenario.For both examples, for the needs of machining by postprocessing, G code was also obtained for available WEDM machine.After loading in the control unit memory, this G code was first tested by graphical simulation on WEDM Machine Ewis, Fig. 11, and afterwards machining of those parts followed.
For scenario SC1 was machined the test example.A test example is given in Fig. 12.It has 3 machining features: two inner contours of the circle and a rectangle with rounded edges and an outer contour of a rectangle shape.The contour of the workpiece was cut in aluminum sheet with 2 mm thickness.The machining result of the example for scenario SC2 and real machined part on WEDM machine Ewis are shown in Fig. 13.The contour of the workpiece was cut in steel sheet with 3 mm thickness.
These experiments have confirmed that it is possible to realise scenarios for programming WEDM machine tool based on STEP-NC standards.

Conclusion
This paper presents methodology for successful implementation of scenarios for applying protocol STEP-NC for programming WEDM machine tool, including machining simulations based on STEP-NC program.In this paper we used a successfully established environment for off-line programming within a CAD/CAM system that enables wire tool path simulation, material removal simulation, and machine simulation involving the movement of machine parts.Chosen environments that fully meet all requirements are STEP-NC Machine and PTC Creo.Nowadays, machining simulation plays an important role in modern manufacturing, and this paper demonstrates integration of STEP-NC based machining simulation with CAD/CAM systems.
The paper shows the possibility of applying a new method of programming based on ISO 14649 and ISO 10303 standards, known as STEP-NC.Since there is still no sufficient available CNC machines that can directly interpret the STEP-NC program, preparing for this method of programming is reduced to the machining and machine simulation and translation into G code, which can be realized on the available CNC machine tools, in this case on the WEDM.
STEP-NC standard is almost finalized, and in the future we can expect the shop-floor application of STEP-NC program.Existing CNC machine tools in the future will be replaced by machines, whose control systems can receive and execute programs in the STEP-NC format.

Figure 1
Figure 1 Current ISO 6983 and new interface ISO 14649 for programming CNC machine tools

Fig. 4 .
According to the IDEF0 methodology, by analyzing diagram A0, we get the basic flow of activities shown in Fig. 5.The basic activities are: A1 -Generic STEP files and tool path in CAD/CAM systems, A2 -STEP-NC program generator, A3 -Postprocessing programs, A4 -Machining simulations and A5 -Machining.

Figure 4
Figure 4 Top-level IDEF0 diagram for programming and simulation for WEDM based on STEP-NC Also, during the wire path simulation, a complete CAD model of virtual machine can be included into the simulation, in the STEP-NC environment, where the machine is running by the STEP-NC standard-based program.After program verification, the postprocessed program in G code can be safely executed on the WEDM machine tool, within the A5 activities.The machining program can be obtained by applying both scenarios (SC1 and SC2).The application of this methodology is presented in section 5. Two examples of machining are used, one for each scenario.

Figure 5 Figure 6
Figure 5 Basic flow of activities for implementation scenarios for applying protocol STEP-NC for programming WEDM

Figure 7
Figure 7 WEDM machining simulation in CAD/CAM system

Figure 8
Figure 8 XML representation of WEDM machine

Figure 9
Figure 9 STEP representation of WEDM machine Ewis

Figure 10
Figure 10 WEDM machining simulation in STEP-NC Machine environment

Figure 11
Figure 11 Graphical simulation on WEDM machine tool

Figure 12
Figure 12Machining of a part for scenario SC1

Figure 13
Figure 13 Machining of a part for scenario SC2