Share this

Open design of five-axis linkage CNC system

2026-04-06 07:45:14 · · #1
1. Overview In the more than forty years since MIT developed the first three-axis milling machine CNC system, the design methodology of CNC systems has undergone tremendous changes. Especially in the last decade, with the rapid development of computer technology, CNC systems, from overall structure to detailed design, from software design to hardware design, are significantly different from early CNC systems. Early CNC systems, for efficiency reasons, implemented many functions using hardware circuits, resulting in high specialization and poor maintainability and scalability. On the other hand, the computing speed of general-purpose computers has increased exponentially over time. The computing power of a microcomputer now reaches or exceeds that of early minicomputers. Moreover, general-purpose microcomputers are widely used, have well-established and open standards, and are supported by numerous peripheral hardware devices and abundant software resources. Utilizing microcomputers for CNC system development can achieve twice the result with half the effort, thus becoming the current international trend in the CNC field. Five-axis linkage CNC systems involve a large number of linkage axes and two rotary motions, resulting in complex interpolation algorithms. Furthermore, their components, such as servo drive units, position feedback units, error compensation, electrical control, and machine tool mechanical structures, have different characteristics in different applications, which must be fully considered during the overall system design. Currently, most CNC systems cannot meet this diverse need, requiring different models for different applications, inevitably increasing development and maintenance costs. Researching open CNC systems and their functional components allows for easier recombination of the entire CNC system according to user needs, improving system portability, scalability, maintainability, and compatibility. 2 Open Design of CNC System Hardware 2.1 General Principles of Hardware Design Traditional CNC system hardware design falls into two categories: large-board structures using dedicated chips and bus-based architectures. Large-board structures present a closed system to the user, limiting functional expansion and system maintenance. Bus-based architectures offer some flexibility, but because the bus is determined by the manufacturer and lacks a common industry standard, products from different manufacturers are not interchangeable. Therefore, this design approach is no longer suitable for the needs of modern manufacturing. On the other hand, with the development of computer technology, the speed of microcomputers is vastly different from what it was a decade or two ago. In this context, the focus of hardware and software design has shifted from efficiency to interchangeability and maintainability. Influenced by this, the design process of CNC systems has seen an international trend towards standard buses and reconfigurable modular units, moving away from large-board structures or dedicated buses. The openness of hardware design is mainly reflected in bus standards. An open CNC system consists of multiple modules connected as a whole via a standard bus. The selection of the bus should meet three requirements: ① It should be technologically advanced enough to meet the information exchange needs of various functional modules in the CNC system. ② The bus standard should be completely open and widely recognized and used internationally, rather than a specific bus standard defined by a particular manufacturer. ③ It should have high reliability. Only after selecting a suitable bus standard can the design of each functional module proceed. In a CNC system, the main functional modules include: motion axis position control module, electrical control module, machine tool operation panel and CNC panel interface module, communication module, and display module. Functional modules should be reconfigurable to avoid conflicts in I/O port addresses and interrupt types between different modules. 2.2 Hardware Design of the Five-Axis CNC System In the development of the five-axis CNC system, we chose an industrial PC as the basis for the design. Industrial PCs conform to various industrial standards, are open computer systems, have good compatibility with commonly used microcomputers, and have extensive software and hardware support. Currently, there are two main types of slot buses on industrial PC backplanes: ISA bus (industrial standard bus) and PCI bus (peripheral interface). The data transmission rate of the ISA bus is relatively low, but it is sufficient for the needs of the CNC system. At the same time, a high bus rate places higher demands on the hardware of each functional module. Therefore, we chose the ISA bus as the basis for all module designs. Because the five-axis linkage interpolation algorithm is complex, involves a large number of floating-point operations, and has high real-time requirements, we chose a Pentium 166 CPU to perform the interpolation calculations. In addition, each coordinate axis in the system needs to have position control functionality. Position control requires high real-time performance and involves a large number of axes. Sharing a CPU with interpolation would overburden the CNC system host, making it difficult to guarantee real-time performance and concentrating fault risks. A better approach is to use an independent CPU for each axis, employing a hierarchical system architecture. Based on the different methods of information exchange between the position control CPU and the host, two structures are proposed (see Figure 1). The first structure directly inserts the position control board into the ISA slot of the industrial computer baseboard. In this case, the host directly transmits information with multiple position control boards. Due to the low speed of the position control board CPU, the data communication stage wastes host CPU resources; the more axes controlled, the lower the host CPU efficiency. Furthermore, the host needs to take measures to ensure accurate time synchronization of multiple position control boards. Therefore, we chose the second structure. The second structure uses a separate communication unit to complete the information transmission between the host and the position control boards. The communication unit exchanges information with the host through a dual-port memory and with the position control boards through a self-built local bus. The dual-port memory has a capacity of 2kb and also functions as a data buffer. This scheme significantly reduces the CPU time spent by the host computer on information exchange. The communication unit plays a crucial role in the system. It receives the coordinate axis position commands obtained from the Pentium 166 interpolation and distributes these commands to the position control board via the parallel port. Additionally, the communication unit provides management functions for the CNC panel buttons and indicator lights. The design of the communication unit is shown in Figure 2. The simulated ISA bus in the figure provides a channel for information transmission between the communication unit and the position control board. This "simulated ISA bus" is designed according to the needs of the position control board and commonly used control cards. It reconstructs some signals of the standard ISA bus, including various signal lines required for I/O operations, interrupt signal lines, ready control, power lines, etc. The position control board designed according to the "simulated ISA bus" is fully compatible with the standard ISA bus. This approach has two advantages: ① During system development, the design and debugging of the communication unit and the position control board can be completed independently using a microcomputer, with no sequential dependency between them; ② In systems with a small number of control axes, the first structure shown in Figure 1 can be used, directly inserting the position control board onto the industrial computer's baseboard, facilitating system reconfiguration. [align=center] Figure 2 Communication Unit Design Principle[/align] During the design process, we initially used a custom-designed dedicated bus between the communication unit and the position control board. While the dedicated bus was efficient, the position control board designed based on it was incompatible with the industrial computer, resulting in poor interchangeability and complicated development, debugging, and maintenance. Therefore, we redesigned this part, adopting an open approach and using an "ISA-like bus" to approximate the standard bus, which yielded good results. 3 Open Design of CNC System Software The software design of an open CNC system first requires selecting a suitable operating system and software development tools. Currently, commonly used operating systems such as DOS, Windows 3.1, Windows 95, and Windows NT are all applied to CNC systems. DOS is essentially a single-tasking operating system; multitasking under DOS can only be achieved through interrupt technology. The various software modules of a CNC system generally cannot execute simultaneously. If simultaneous execution is required, the scheduling problem between modules must be solved manually. However, DOS is small in scale, and people are relatively familiar with it, making development and application on DOS relatively easy. Windows 3.1 is a non-preemptive multitasking operating system that can complete multiple tasks simultaneously. Its disadvantage is that when a task, such as task A, obtains CPU resources, whether other tasks can complete successfully depends on whether A can process its current event in time; therefore, real-time performance is not guaranteed. Windows 95 and Windows NT are both high-performance preemptive 32-bit multitasking operating systems with good user interfaces, and functionally suitable for the needs of CNC systems. However, their stability in industrial applications remains to be proven. Considering all factors, we chose the DOS operating system. Correspondingly, we chose Turbo C++ 3.0 as the software development tool. The software design work is divided into three parts: host software, communication software, and position control card software. Developing a sound communication protocol is the primary issue. To ensure reliable data transmission, the communication mechanism uses a time-division multiplexing method to transmit information to the host and position control cards separately. The synchronization relationship in time is shown in Figure 3. The division of time slices and the synchronization relationship between the three parts are controlled by the communication unit. At the beginning of the first time slice, the communication unit sends a synchronization signal to the host and position control cards, notifying the host to write new data into the dual-port RAM, and simultaneously initiating position control calculations on the position control cards. During the second time slice, the communication unit retrieves position instructions from the dual-port RAM and distributes them to each position control card, while simultaneously collecting actual position data from each position control card and writing it into the dual-port RAM. [align=center]Figure 3 Relationship between processes in the CNC system[/align] The host software mainly consists of functional modules such as NC program editing, manual operation, electrical control, communication, automatic machining, machine tool parameter adjustment, system positioning, and torque compensation. The following uses the electrical control module as an example to illustrate the open design method of the software module. Electrical control is an indispensable part of all machine tools. In CNC machine tools, there are three implementation methods: external PLC, embedded PLC, and virtual PLC. Most PLCs on the market have communication capabilities and can be integrated with CNC systems via communication interfaces; this type of electrical control is called an external PLC. Alternatively, an intelligent I/O interface card can be designed to directly integrate with the CNC system via a bus. This card has an onboard CPU to perform switching logic operations and control; this is called an embedded implementation. Another approach is to directly utilize the CNC system's CPU to perform periodic logic operations, combined with ordinary switching I/O cards to control electrical switches; this is called a virtual PLC. If conventional programming methods are used, different software interfaces must be designed for these three electrical control methods. The CNC system software will directly involve the implementation methods and details of electrical control. If the control method changes, extensive software modifications will be necessary. Software developed in this way has poor versatility and is difficult to adapt to unforeseen changes. To increase the independence between software and hardware, we used object-oriented technology for an open system design. Clearly, regardless of the control method, the goal is the same. After careful analysis, we identified the commonalities among the three components, leading to the abstract class CPlc. This class provides all the external features of the CNC machine tool's electrical control and complete message processing functions for the main CNC system software. Other parts of the CNC system only need to send messages to the PLC object to trigger corresponding actions from the electrical switches. This part does not involve the details of the electrical operation process. Based on the abstract class CPlc, derived classes CExernalPlc, CEmbedPlc, and CVirtualPlc are defined for the three methods respectively. Message interpretation and hardware operations are handled in these classes. The electrical control software obtained according to this design concept has the structure shown in Figure 4. As can be seen from the figure, this design method adds an abstract class hierarchy between the main CNC system software and the electrical control hardware, reducing their interdependence and making them relatively independent parts. The CNC system software obtained using this method has equipment-independent characteristics. When new hardware devices appear, a new object class is simply derived from the original abstract class. The messages are interpreted according to a common standard, and the hardware is manipulated to perform corresponding actions. No other parts of the software need to be modified, greatly improving the efficiency of software design. In fact, after clearly defining the data structure and meaning of the messages, anyone can design new electrical control hardware and corresponding drivers based on this specification and integrate them into the system. This is also the main purpose of open software design. [align=center]Figure 4 Abstract Design of Electrical Control Software[/align] The above uses a PLC as an example to illustrate the idea of ​​open design for CNC system software. We completed the software design of the CNC system according to this approach. Although we conducted numerous analyses and discussions in the early stages of development, the software and hardware development proceeded relatively smoothly after the system structure was determined. From the development process and online debugging, open design can effectively shorten the software development cycle and improve the quality of CNC system software.
Read next

CATDOLL 42CM Silicone Reborn Baby Doll

Height: 42cm Silicone Weight: 2.4kg Shoulder Width: 15cm Bust/Waist/Hip: 28/28/30cm Oral Depth: N/A Vaginal Depth: 3-8c...

Articles 2026-02-22