CAM function development of wire cutting numerical control system

In the third chapter, we completed the kernel customization and software transplantation of the Windows CE system.
The released CAWEP software realizes functions from graphics drawing, editing to motion simulation, code output, etc.
Realize the control of wire-cutting machine tools in a positive sense. In this chapter, we conduct research and development on the basis of existing software.
Improve the CAM module of the existing software, and realize the control of the wire cutting machine tool by combining software and hardware.
4.1 Function introduction of wire cutting CAM
This paper has completed the construction of the existing Windows CE development environment and the transplantation of the existing software.
After completing the CAD/CAM function, in order to realize the intelligence and automatic control of the wire cutting machine tool, we must start from the software
The CAM function is realized at the two levels of the hardware and the hardware respectively . CAM function refers to the use of computer-aided completion, from production
A series of activities from preparation to the entire process of product manufacturing, using computers to link the manufacturing process with production equipment,
Planning and management of the manufacturing process and the control and operation of production equipment, its software control system
The function of data conversion needs to be completed in the middle, and the hardware part is combined with the bed motion module to complete the motion control of the machine tool.
system function [44] .
The CAM function of the wire cutting machine tool is the most important part of the embedded CNC system. Described from the software level,
It is based on the drawing and editing of engineering drawings, parameter setting, trajectory generation, code output and processing
The four-step operation of engineering simulation is to edit the engineering drawing, track offset, and after the interpolation operation, the graphic element
The transformation of information into numerical control codes is the key to automatic programming of software systems. The CAM process is shown in Figure 4-1 .

In the second chapter, this paper analyzes each hardware module in detail. To realize the CAM function from the hardware level, it is necessary to complete
control the four hardware modules of the machine tool workbench, wire feeding system, working fluid system and power supply system, among which the walking
The relevant control of wire, working fluid, and power system can be handed over to the inverter to complete, and the remaining most important part is
It is the control of the workbench. The key to control the workbench is to let the stepper motor drag the workbench to move, to complete the contact with the electrode wire.
For relative motion, the motion trajectory is not only the outline of the design.
For the control of the workbench, on the basis of the existing CAM module, a new function window is added, which is compatible with the existing
The combination of the motion controller and its combination, on the basis of the library and some codes provided by the manufacturer, carries out secondary development to realize
The control of the motion controller enables it to convert the processing information generated by the software into the pulses required by the stepping drive.
Impulse signal and direction signal, and output the signal to complete the motion control of the stepper motor. Implementation of workbench control,
It is the development process of the combination of software and hardware, the key to the motion control of the machine tool, and the realization of the motion control function of the embedded terminal.
The current process, the third section of this chapter will introduce the process of motion control implementation in detail.
4.2 Function Analysis of Windows CE EDM Embedded CNC System
The essence of the so-called embedded CNC system is to implement the functions of the general CNC system in an embedded way.
Now, it should have the function of realizing the transformation from product design to production, and the system itself must meet the needs of embedded
Customizable features. The key to function realization is to combine the advantages of the two under the premise that the hardware meets the requirements.
Together, as developers, we need to analyze and grasp the similarities and differences between the two from the basic level.
Numerical control system is the abbreviation of special computer numerical control system, which uses computer to realize digital program
Control technology, which uses the computing power of the computer to convert the control program into the moving parts
Motion trajectory, and sequential logic control functions for peripheral operations. Storage, calculation and logical judgment of operation instructions
Various control functions such as computer chips and software are completed, and the corresponding interface circuit is configured, and the generated
The instructions are sent to the actuators to drive the equipment to run, so as to realize the control of the movement of the CNC equipment [45] . Embedded Systems
The device is composed of an embedded chip (computer system) and an external control interface. The control system operated by the chip is the whole
The core of an embedded system, the external interface is connected to the controlled object, so that the controlled object can accept the chip sent
Control instructions to complete the corresponding motion operations or prescribed tasks. The structural framework of the embedded CNC system is shown in Figure 4-2
shown.

 

It can be seen from the above that the embedded numerical control system of wire electric discharge cutting needs to simulate and simulate the whole electric discharge machining process.
In the software system, from graphics drawing, editing, electric processing parameter setting simulation, the final output can be directly used for processing
Work instruction, and transmit the instruction to the hardware drive device through the external circuit, complete the processing movement, and realize the production
Process intelligence and automation. This paper uses the transplanted software system to realize most of the functions at the software level.
In order to realize the motion control function of the embedded numerical control function, its core converts the code information at the software level to
It can be transformed into corresponding electrical signals, and can drive the motor to move and complete trajectory control.
This article uses the WEDM of the Windows CE embedded terminal developed and transplanted by the laboratory itself as the
The main control software can meet the actual control requirements and complete all the design and development of the software side. This chapter implements wire cutting
The embedded control function of the motion control of the machine tool table, starting from the actual processing needs of wire cutting, comprehensive consideration
Advantages and disadvantages of software and hardware, to achieve a good control effect.
4.3 R& D and realization of wire cutting CAM function
For the software design of industrial application systems, the most important factors are stable operation and high operating efficiency. MFC
In line with the requirements of industrial control systems, based on the follow-up development of Windows CE operating system CAWEP software, this paper
The development environment of Windows CE is built in Visual Studio 2005. On the basis of transplanting the original software,
Use the MFC basic class library, use C/C++ to write and develop the application framework, and complete the wire cutting system
CAM function module.
4.3.1 Classification analysis of machine tool motion control
As the functions of electronic systems become more and more powerful and complete, software and hardware collaborative development and design technology is becoming more and more popular.
People's attention has gradually become normalized. Under the guidance of the system's target requirements, it comprehensively analyzes the software and hardware functions of the system.
And the existing resources, give full play to the advantages of both, so that it can reach the best state. To design the motion of the bench
The control system must understand which movements the machine tool table needs to complete and the essence of these movement controls.
The author roughly summarizes the movement of the wire cutting bed into the following categories:
1) Return to zero and limit position, both return to zero and limit position are the protection and positioning movements of the workbench, which can be set by setting
The method of setting the mechanical origin and the limit switch can complete these two kinds of movements. Generally, the bed of the machine tool has these two devices.
To realize the control of this kind of movement, the origin and limit signals need to be given to the software main control system.
2 ) The motion of the machine tool table can be divided into fixed length, fixed point, fixed speed and other motion modes, and the realization method is jogging
Type and continuous motion, these motion modes are generally used for the test of machine tools, the essence of which is to control the stepping motor
To complete the control of these motions, the driver layer needs to have a good driver code reserve.
3 ) Start and stop, acceleration and deceleration, and cutting motion of the machine tool table. These three types of motion are the motion control of wire cutting machine tools.
During the processing process, the machine tool table starts and stops, the acceleration and deceleration and the cutting movement of the relative movement of the electrode wire,
These factors directly determine the quality of processing. The completion of these movements is not only to control the start and stop, commutation,
Acceleration and deceleration and interpolation motion.
4.3.2 Realization of CAM function of wire cutting software
After using the PB6.0 plug-in in VS2005 to build a Windows CE development environment, create a new one named
CAWEP 's new project, after selecting the MFC smart device application in the VC++ smart device, it will pop up
In the program wizard, after selecting the program runtime function platform SDK and the program type, you can use it in the solution manager
To see the CAWEP project, copy the existing header files, source files, and resource files to the new CAWEP
In the project, after modifying some functions that are not compatible with Windows CE , the transplanted version can be generated in VS2005
Software, generate a project in the menu bar, you can generate files.
After the result is generated successfully, you can find the executable CAWEP.EXE file under the release folder.
Burn the CAWEP.EXE file to the development board running Windows CE to run. This article is building a development environment
The environment is to install the CE simulator, just deploy the generated CAWEP.EXE file to the simulator, and the deployment is complete
After that, in the debugging option of the menu bar, complete the successful execution of the debugging, and you can get the live simulation of the software running.
During the software development process, using the simulator to simulate the operation of the software in the hardware is the best debugging and optimization
The way of software, the software operation is shown in Figure 4-3 .
After the transplantation is completed, before developing the CAM function, it is necessary to deeply study the CAWEP program structure
Understand, and combine the VS2005 integrated development function to carry out the research and development of software CAM function. Proficiency in learning and mastering
The use of VS2005 and good knowledge of C/C++ language can help speed up the progress of development. in resources
Various resources of CAWEP are sorted under the CAWEP.rc folder in the view : Dialog folder among them
Contains all existing dialog boxes, you can view various definitions and modify button functions, our newly added control
The module dialog box is also established under this folder, and the corresponding dialog box button can be found in the source file .
The corresponding dialog box definition, edit the development code; the menu folder is the main interface design of the software, and related
Reserved interface, under the reserved interface of the software main interface, embed the designed and developed module, and complete the definition, that is
Features can be added. Figure 4-4 is the main interface of software system development.
In the Win CE6.0 development environment under VS2005 , the process of adding a new CAM function is: first
Under the Menu main interface, find the corresponding interface and name the interface. After creating a new interface, complete the relevant settings and definitions.
A new class library and MFC framework will be generated, and the IDD of the newly generated function will be uniformly named . In subsequent development, it is convenient
Modify source code, update and debug software functions. The newly created MFC framework can be found under the Dialog folder ,
At this time, use the toolbox tool to design the desired control interface, double-click the control component to find the source folder and header file
The corresponding program source code box is generated under the folder, we only need to perform different function buttons in the source file and header file
Just do the development.
In the previous section, we analyzed the requirements for machine tool motion control. For the control of zero return and limit, the machine tool
Generally, the sensor with limit switch and zero point positioning, only needs to be connected to the corresponding hardware interface to complete the alignment.
should be controlled. Motion modes such as fixed length, fixed point, and fixed speed all control the X- axis and Y- axis of the machine tool in different ways.
Movement distance belongs to the inspection and debugging stage of motion control. To complete these movement functions is to realize continuous automatic
The first step of motion control, we add the test function as an independent interface to the original software to realize
The function of this part is called exercise test.
In the Menu option of the main interface , we have created a new one called Open Connection
button, and the generated source file is named MyOpenNet.cpp , the corresponding MFC framework is established, and the new
Each button in the MFC framework is defined in MyOpenNet.cpp , and the corresponding function development can be completed.
For the test function interface, the control interface as shown in Figure 4-5 is designed , and the corresponding input window can be input in the picture.
Close the parameters to complete the detection of the motion function. This window interface realizes the connection of the motion controller and XY motion detection
And linear and circular interpolation motion detection function.

 

After the interface design is completed, it can be developed under the corresponding source code file, and the library text supported by the motion controller
software, loaded into the CAWEP development environment, you can use the API provided in the library to develop the corresponding functions
hair. In the process of loading the library, the configuration of the path has a certain impact on the generation of the application software.
After configuration, you can start the code development of the corresponding function. Specify two axes as relative position circular interpolation function
C45CE_rel_arc_move(u16 *axis,long*rel_pos,long *rel_cen, u16 arc_dir) ;
The arc interpolation of the specified two axes can be completed by a few numbers, and the source code of the function realization is shown in Figure 4-6 below .

 

The function library of the motion controller provides function call commands for common motion functions. We choose to call XY
The motion control function of the axis, the linear arc interpolation function, after the source code is compiled, click the generate button, you can
Generate executable EXE files. During the generation process, if the function library of the motion controller is called through the path,
At the last execution, the EXE file and the DLL file of the function library should be placed in the same folder.
Load the library file into the source file, the generated EXE file can be executed, and load the generated executable file into
Figure 4-7 shows the real situation in the development board running Windows CE system .

 

After completing the development of the motion detection module and verifying it, we further complete the wire cutting motion
Development of control modules. Unlike the motion-side test, motion control requires continuous, automatic motion rather than point control
To develop the function of this module, we need to understand the principle of data storage and movement principle of the software. stepping
The motor moves a fixed displacement after receiving a command, so I want to realize real CAM from inside the software
function, after completing the related processing of the engineering drawing, the data of storing the engineering drawing information should be given to the motion control
function, so that each corresponding position data can get a corresponding movement.
After the user draws and edits the engineering drawing, the software completes the relevant settings, and the information of the engineering drawing is represented by a circle
The shape of the arc or line segment exists, and its position information is stored in the CTypedPtrlist class, we need
All data used is in this class. m_tracklist is a global variable linked list defined to store the
The data information that needs to be called before, we define the function to find the head position of the data linked list first, and then use the loop judgment
determine the type of internal data (straight line or arc) and the quantity of data (number of processing tracks), and the final judgment
The interrupted data type is passed to the hardware call function, and the continuous import of data can be completed, thereby completing the continuous motion
continue to control. Figure 4-8 shows part of the code implemented by the data call.

 

 

The data information generated by engineering drawings is continuously and completely called to the motion control function, so that the motion can be
Continuous completion is the most critical step in realizing automatic control. The function realization of this control software, in the hardware function
Under the guidance of the software and hardware, the motion control function suitable for wire cutting machine tools is developed, and the data is completed from the inside of the software.
It is said that the integration from data generation to processing movement has been achieved, and the real sense is the realization of wire electric discharge cutting
CAM function of the machine tool . After completing the preliminary editing of the CAM function code, burn the generated executable file
Written under the control board, the control system runs on the embedded platform as shown in Figure 4-9 .

 

4.4 Chapter Summary
This chapter completes the CAM function of the wire-cut electric discharge machine tool and realizes the automation of the motion control of the workbench.
From the perspective of the combination of software and hardware, we have analyzed the functional requirements of the real wire cutting automation;
Analyzed the functions that need to be realized at the software level, and the classification of motion control types; introduced the software development tools
tools and development process; finally, under the requirements of hardware control, the development of software was completed, and the wire cutting machine tool was realized.
Motion testing and motion control basically meet the needs of automatic control.

 

 

Guess you like

Origin blog.csdn.net/YEYUANGEN/article/details/132311200