Machine tool numerical control software structure system

Foreword

Affected by the historical process of computer and microelectronics science and technology development, the traditional structure mode of CNC machine tools consisting of three major modules: metal cutting machine, servo drive motor and numerical control system has been formed. In recent years, in order to improve the system integration and intelligence of CNC machine tools, after NC and CNC, a new generation of CNC NGC and fully open structure OSA have been proposed. The CNC system tends to be open to multi-machine interconnection compatible with PC architecture. The type system has two forms: one is PC+NC and the other is PC-based. The common feature of these CNC systems is the use of multiple CPUs at the upper and lower levels. The PCs at the upper level have certain openness, while the lower levels often have multiple CPUs. The types are varied and the buses are different. The structure of the CNC system varies widely. There are many different ways of communication, and they are not open and universal. For example, in the current domestic high-end CNC system, some subordinates use multiple MCS-51/96 series 8/16-bit MCUs and dedicated boards; some of them are multi-master 8086/87 systems on SS-Bus. The SS-Bus and the superior PC's ISA bus are bridged by a dedicated data communication board; others use TOKO's 3700 series of dedicated chips.

Under the traditional CNC machine concept, the CNC system not only realizes the process function of the CNC machine tool but also completes the motion control of the CNC machine tool. Therefore, the CPU and hardware of the upper and lower levels are closely connected, and the non-openness of the lower-level CPU system will affect the entire CNC system. The openness, scalability and upgradeability of the CNC machine tool are interwoven with the hardware of the CNC system. In this situation, the numerical control of machine tools is still a difficult and complicated process for machine tool manufacturers. The development and upgrade of CNC machine tools are limited by the software and hardware of CNC systems. The flexibility and integration of CNC machine tools is difficult to improve. It creates difficulties for the realization of manufacturing automation.
Taking note of the above problems, combined with the rapid development of PC theory, technology and application in recent years, this paper proposes a machine tool numerical control software structure system, namely PC + PC-based complete digital machine tool structure system. Under this concept, the process software runs on a Host-PC, and the generated device motion information is transmitted from the serial port (or Modem card) to the complete digital machine tool. The complete digital machine tool accepts the ISO standard text address block format, function, spline, table or point-by-point servo system position reference signal, which is equivalent to allowing the user to freely define the interpolation algorithm, thus greatly increasing the two axes. The flexibility of the above multi-axis linkage equipment processing program has improved the ability, speed and accuracy of the complex curve (face) machining of CNC machine tools.

1
Figure 1 Machine tool numerical control software structure system

1 Machine tool numerical control software structure system and analysis

The machine tool numerical control software structure system can be represented by Figure 1. In the CNC software structure of the machine tool, a complete digital machine tool is a PC standard peripheral device, similar to an XY plotter, and complete means that all possible actions of the machine tool can be realized under the control of the PC. All possible machining processes can be realized by the process software running on the PC, so that the CNC machine tool becomes a variety of process software running on the PC and a complete digital machine tool under control. By constructing the device driver of the digital machine tool, the process software is completely independent of the specific digital machine tool. When the machine tool manufacturer produces different types and models of CNC machine tools, the hardware is industrial PC and its series of expansion modules, the main difference is software work. The numerical control of machine tools will completely eliminate the limitations of hardware and software from CNC systems. On the other hand, the same process software can be used for similar digital machines of different manufacturers and models.
Because PC is very flexible in networking technology and mature in technology, it can support multiple network protocols and topologies including Ethernet, Petri net, and even Internet. In addition, PC version CAD/CAM/CAPP is very Rich, it has outstanding advantages in CAD/CAM/CAPP integration, and its performance for intelligent manufacturing system IMS and remote manufacturing has been greatly improved.
In addition, the machine tool numerical control software structure system is conducive to improve the processing accuracy and speed. In this respect, foreign countries are currently considering the use of floating-point DSP on the basis of fixed-point DSP, and designing a high-performance real-time operating system for them; domestically, MCS-51/96 series single-chip microcomputer (SOC) is still the main Each control axis uses a single CPU to meet the high sampling frequency requirements. Because the speed, accuracy, and hardware resources of the SOC are very limited, the advantages of the DSP are mainly focused on the fast completion of addition and multiplication operations, such as performing fast Fourier transform (FFT) or constructing a digital filter, thus using SOC or DSP. Digital controllers have greatly limited the further improvement of system performance, and have poor openness and versatility, limited development tools, long development cycle and high development cost. In view of the fact that the overall performance of the Pentium CPU has surpassed that of the DSP, this project proposes a 32-bit high-performance controller based on a Pentium CPU that is fully compatible with the PC. This technology can also be used in machine tools with strong inter-axis dynamics, such as virtual axis machine tools and robot motion control, where independent single-axis control is not possible to achieve good performance. It can be seen that some functions provided by the machine numerical control software structure system are difficult or impossible to achieve under the support of the existing numerical control system.

2 Complete digital machine tools and their controllers

In the system shown in Figure 1, the complete digital machine tool controller hardware is the PC and its expansion board, with manual software support, manual panel control, command interpretation and machine status report, and motion control. The complete digital machine tool controller and the mechanical part of the machine tool form a complete digital machine tool, which can be represented by a block diagram as shown in Figure 2.
1
Figure 2 Complete digital machine block diagram
  1. Complete digital machine tool manual panel
  2. The complete digital machine tool manual panel realizes the manual control of the basic I/O switch of the machine tool, such as the display of the basic state of the machine tool, the manual adjustment of the work surface position and the emergency stop. The manual panel of the existing CNC machine tool is often directly controlled by the switch quantity control module of the numerical control system. The information transmission between the panel and the numerical control system is parallel, the interface is complicated, and the standard and protocol cannot be specified. In order to solve this problem, the complete digital machine tool manual panel is managed by MCS51 series MCU, and standard serial communication is used to exchange information with digital machine tool controller. After the complete digital machine tool is powered on, the digital machine tool controller and the MCU start the system self-test, and then enter the waiting state. The MCU periodically checks whether the input state changes, and changes the input state from the serial interrupt to the digital machine controller. , by which the corresponding response. The display information output from the digital machine tool controller to the manual panel is processed by the interrupt service program of the microcontroller. The input and output information of the manual panel is:
    1. The choice of working methods for a complete digital machine: manual / online.
    2. Manual single step feed.
    3. Manual continuous feed.
    4. Go back to the origin.
    5. Feed rate override.
    6. Feed coordinate selection.
    7. The status of the spindle motor, pump, electromagnetic clutch brake, etc.
    8. Emergency stop.
    9. Pause and display.
    10. Feed coordinate overtravel display.
    11. The fault is displayed.
  3. Complete digital machine tool controller software
    The complete digital machine tool controller software is developed in C++ under DOS, and its block diagram is shown in Figure 3. The digital machine tool controller software is based on DOS, mainly because it can directly access the digital machine tool controller expansion board under this operating system, and the real-time performance of DOS is also recognized. In Figure 3, the real-time control module is implemented by the interrupt service routine, which is the only module with real-time requirements in the entire system. In order to run other modules in real time, only a few data queues are used. Each queue is maintained by a class, and its data and state can be accessed through member functions.

    1
    Figure 3 Digital machine tool controller software block diagram

    The motion commands of the master computer and the manual panel are processed by the monitoring and instruction interpretation module to generate a motion code queue, which is interpreted by the motion code interpretation module to generate a reference signal data queue. When the complete digital machine is in the automatic state, the motion and auxiliary function commands are generated by the process control software of the host computer. The status of the complete digital machine, including the current position, fault information, and relay/contactor contact on/off, can be sent to the host computer from the standard serial port according to the requirements displayed by the process control software.
    The complete digital machine tool controller software shown in Figure 3 has nothing to do with the control of the specific machine tool and its process performance. That is to say, the digital machine tool controller software supports different types and models of machine tools with machine tool numerical control software structure, such as Milling machines, lathes or grinding machines. The difference between the number of machine feed axes and the auxiliary functions required by different processes does not affect the digital machine tool controller software, nor is it the object to be controlled by the digital machine tool controller. The complete digital machine tool controller makes the machine tool sensor output and motion control ( Feed servo motor inputs) and other low-level operations are controllable to the host computer and are complete. On the other hand, due to the introduction of the concept of a complete digital machine tool and the digital machine tool controller, the interface between the control and hardware of the CNC machine tool process is standard serial communication, and the control of the CNC machine tool process is software independent of hardware, thus realizing the machine tool numerical control. Software.

3 application examples

The above-mentioned machine tool numerical control software structure system has been applied to the transformation of a three-coordinate two-link CNC milling machine. Before the transformation, the CNC milling machine adopts the open CNC system based on PC-XT. The three-axis servo control is driven by DC servo motor, and the semi-closed position detection is performed by the code wheel. Finally, the position servo control is carried out by the special servo board of Japan TOKO company. It can control the machine to complete two-axis arc motion, three-axis linear and spiral motion. In order to improve the performance of the CNC milling machine and verify the numerical control software system of the machine tool proposed in this paper, the original CNC system was removed, and the D3M-2A three-coordinate complete digital milling machine was newly developed. The controller board was selected from the industrial control level 80486DX4-100. , raster count card, D / A card and switch I / 0 card are AT bus expansion card, performance indicators are as follows
  1. All accuracy indicators are not inferior to the original machine.
  2. Three coordinates three linkage.
  3. The smart manual panel is simple and friendly, with up to 81 key values ​​and 16 displays.
  4. The human-machine interface is friendly and can accept standard G codes, parametric equations and point-by-point data.
  5. Fast, full-featured and reliable.
  6. Separate the software and hardware work of the machine performance upgrade, and independently upgrade the software and hardware.
  7. D3M-2A three-coordinate complete digital milling machine control software can be used for motion control of electromechanical equipment of other machine tools (especially multi-axis multi-axis linkage machine).
Figure 4 is the tool center trajectory and its polar coordinate equation of the D3M-2A three-coordinate complete digital milling machine under the control of the main control computer. If the machining plane selects the xy plane, the master computer generates the coordinates of the trajectory and sends it to The block of D3M-2A is as follows
t=0;
While(t
{
j =( p /tf)t
r =10.000cos3 j
x= r cos j
y= r cos j
Send.Data
t+=0.004
/* set the initial time to zero*/
/* cycle to end time tf*/

/* Calculate the polar angle and increase it evenly over time*/
/* Calculate the polar path, according to the equation in Figure 4 / *
/* polar coordinates to Cartesian coordinate conversion / *
/* polar coordinates to Cartesian coordinate conversion / *
/*Tune the send data function*/
/* time increases by one sampling period*/

1
Figure 4 Center trajectory of end mill and its polar coordinate equation

It can be seen that in the numerical control machine tool structure proposed in this paper, the programming of complex curves/faces (such as free-form surfaces described by spline functions) described by the available equations is greatly simplified, and straightforward, no longer traditional. The linear/circular interpolation acts as an intermediary, thus avoiding the problems in terms of calculation speed and accuracy.

4 Conclusion

The structural system of machine tool numerical control software proposed in this paper is a new concept of numerical control technology, which realizes the full openness in the true sense and simplifies the process and complexity of machine tool numerical control. It will effectively promote the research of CNC machine tools. Development, production and popularization are particularly beneficial to improve the numerical control rate of our machine tools. At the same time, the technology can further improve the processing speed, accuracy and reliability of the single machine, so that the CNC machine tool can make a substantial leap in the flexibility and integration of manufacturing automation, and provide conditions for realizing rapid reconfigurable technology and intelligent manufacturing. conclusion as below:
  1. For the first time, a structural system for separating the control of the process performance of CNC machine tools from the hardware of specific equipment and control systems was proposed.
  2. Give full play to the advantages of software and hardware on the PC platform, enrich and improve the development environment, get rid of the limitations of hardware and software from the CNC system, and reduce the hardware overhead of users.
  3. The new CNC machine tool architecture can support the further intelligentization, integration and systemization (including networking) of CNC machine tools.
  4. This technology simplifies, standardizes, opens, generalizes and softwares the design and development of CNC machine tools (especially two-axis multi-axis linkage equipment).
  5. Reduce the number of CPUs, which is beneficial to improve system reliability.