How to realize WEDM programming under Windows syst

  • Detail

How to realize the design of WEDM programming control software under Windows system

as an important branch of special machining, EDM technology has played a very important role in industrial production since its birth In recent years, with the rapid development of computer technology, the digital control technology of EDM has also been improved by leaps and bounds. The author developed a set of wire cutting programming control software on Windows platform, which has been applied in practice, because of the need to overcome difficulties on the road to the blue ocean This system has been used in many factories' wire cutting numerical control transformation projects and the trial production of new products in our institute, with good results and stable work

Brief introduction:

this system consists of two independent software Its module diagram is shown in the attached figure One is automatic programming software for wire cutting This software is compiled by Delphi. Its main function is to automatically generate the NC code of the wire cutting machine tool, and generate the corresponding process diagram and process card. At the same time, it can support DNC, and the computer can directly transmit the code to the control machine Its working process is roughly as follows:

1 First, the geometric figure of the part to be machined is generated by a general CAD platform, such as AutoCAD Output standard DXF file

nowadays, the construction of ecological civilization and beautiful China has risen to a national strategy

2 The DXF file is read by the automatic programming software. Under the instruction of the processing wizard, the process parameters are picked up with the mouse, and the threading point, starting cutting element and cutting direction are selected The computer automatically generates the machining chain list according to the selection, and the NC code is generated from the machining chain list

3. Through the simulation module, read the newly generated NC code, input process parameters, simulate machining, and check the code error

4. The computer automatically generates process drawings and process cards, which are printed out by the printer

5. The code is transmitted to the controller through disk or DNC

the advantages of this programming software are:

a. using the windows platform, the available memory is almost unlimited, and it gets rid of the length limit of the NC code of the past WEDM programming software.

b. it supports multi tasks, and can program at the same time of cutting. These are completely managed by the operating system, safe and reliable.

c. it provides a variety of programming modes, and supports multiple processing and multi line cavity processing, Meet the special process needs of various parts

d. the interface is a Windows standard interface, which is easy to learn and very friendly.

the difficulties in the development of this programming software are:

* the implementation of the interface between CAD and cam:

for the programming of NC machine tools, the geometric model of the machined parts must be established first Now the general CAD platform can generate geometric models very conveniently and quickly In this way, the interface between cam and CAD becomes very important DXF file is a text file format supported by most CAD platforms. Its structure is completely open. It is a good tool for CAD and cam interface However, the current visualization languages provide good file operation support, rich controls and underlying functions. With these good tools, it is easy to realize the interface between CAD and cam

* combine process parameters with geometric path to generate NC Code:

the geometric path information generated by CAD is not enough to generate NC code for part processing According to the needs of various CNC machine tools, different process information should be input In addition to inheriting the advantages of light, durable and cheap traditional wood packaging materials, deep processed wood packaging materials need to input process information such as threading point, cutting point, cutting direction and offset to wire cutting machine tools Because this software runs on Windows platform, its good graphical interface can give full play to the imagination of programmers In this software, I designed a processing guide. Under its guidance, the operator can easily complete the input of process parameters

this program stores processing information in the form of a linked list, including geometric path information and process information. When the process parameters are input, the linked list is generated The program swims around the linked list once, and the code is generated

* NC code translation and simulation processing:

after the NC code is generated, computer simulation processing is also required to ensure the correctness of the NC program and reduce the processing scrap rate The NC code needs to be converted into machining information, and then the machining chain list is generated This is actually equivalent to the process of compiling program source code into machine code, so the theory of compilation principle can be applied here I have developed an NC code compiler, which can convert NC code into processing information and generate processing linked list through lexical analysis and syntax analysis after twice scanning With the processing chain list, the geometric path can be formed by the interpolation module, and then with the help of computer animation technology, the processing situation can be truly reflected

* process card and process diagram generation:

wi applicable materials: plastic plates, pipes, profiled materials. The ndows system provides great convenience for the use of peripherals, and its equipment independence liberates the troubles of many programmers This program adopts the print control provided by Delphi, and programs printer's cannas to automatically generate process cards and process diagrams, making full use of the computing and drawing capabilities of the computer

* DNC computer direct transmission

this program can send the code directly to the control machine through the photoelectric paper tape interface of the control machine, which provides great convenience for the transformation of old machine tools At the same time, it also provides a solution for the networking of new machine tools

another software of this system is the control software of wire cutting machine tool. Its key controls are compiled by VC, and its interface is compiled by Delphi, in which the on-off control uses inline assembly. In the CNC system under windows, the key problem to be solved is that the windows system prohibits applications from directly accessing hardware. In order to enter the ring0 layer, this software compiles a special virtual device driver

the main functions of this control software are:

1 Read in the NC code It also provides modification function

2. A manual console is provided, which can manually move the machine tool at three speeds

3. It can be processed by graphic simulation or by empty running simulation

4. During processing, you can directly control the high-frequency power supply or pause the feeding At the same time, speed and status are displayed

5. Provide automatic clearance compensation

6. Because it runs on the windows platform, it naturally has the ability of multitasking. While cutting, it can carry out other operations at will, play games or watch vcd

the difficulties in the development of this control software are:

1 To provide an NC coder:

this coder should have all the functions of a simple word processor In the past, under DOS status, this was a very tedious work On the windows platform, with the help of Delphi's VCL control, this becomes a very easy work Using the RichEdit control of Delphi can easily realize all the functions of the coder

2. With manual console:

previously, in DOS state, manual speed control depended on software delay, and a cycle subroutine was needed to be designed. Empty cycle generated delay, wasting CPU time On the windows platform, the timer control of Delphi can be used to accurately control the speed of the machine tool. At the same time, because the windows system does not shield the access of the IO port to the application program, the in-line assembly can be used to directly control the movement of the stepping motor Since timer control is actually used for time interruption, its CPU consumption is much smaller than that under DOS

3. Interpolation module:

for CNC system, interpolation module is a very important part In order to meet the requirements of high accuracy, this program uses 0.1um as a pulse equivalent. For various accuracy requirements, the accuracy difference between CNC system and mechanical system is solved by multiple interpolation and one-time feeding

4. Interrupt control under Windows:

shield the application program's control of hardware interrupt under Windows system. In order to obtain the control right of ring0 level of the system, you need to develop your own device driver VtoolsD is a good driver development environment, which can easily compile drivers and avoid cumbersome assembly language

in a word, this system runs on Windows platform, makes full use of the characteristics of windows system, and explores a new way for the development of EDM CNC system

Copyright © 2011 JIN SHI