Research and Implementation of High-Performance CNC Platform Based on Dual ARM
2026-04-06 07:38:40··#1
Abstract : This paper analyzes the current development and application status of CNC systems, and proposes a CNC platform design scheme based on dual ARM controllers for small and medium-sized CNC systems, and gives its technical solution and implementation method. The platform is stable and has a high cost performance. It can be applied to the product development of CNC systems, shorten the system development cycle, and is conducive to the miniaturization and industrialization of more complex small and medium-sized CNC systems. Keywords : CNC system; ARM; Modbus [b] 1 Introduction[/b] CNC technology is a technology that uses digital information to control mechanical motion and working process. CNC equipment is a mechatronic product formed by the penetration of new technologies represented by CNC technology into traditional manufacturing industries and emerging manufacturing industries. The application of CNC technology has not only brought revolutionary changes to traditional manufacturing industries, making manufacturing a symbol of industrialization, but also, with the continuous development of CNC technology and the expansion of its application fields, it plays an increasingly important role in the development of some important industries of national economy and people's livelihood, because the digitalization of equipment required by these industries is a major trend of modern development [1-2]. With the advancement of science and technology and production processes, there are increasingly more implementation schemes for CNC systems. Currently, common implementation schemes for CNC systems include: PLC-based, motion control card-based, motion control chip-based, and microcontroller-based. For complex, large and medium-sized CNC systems, PLC-based motion control, motion control card-based, or motion control chip-based schemes are suitable solutions, always finding a balance between performance and price. However, for small and medium-sized systems, such as dual-axis control systems, the choice of scheme is more difficult. Solutions based on control cards are too expensive, while solutions based on microcontrollers are difficult to guarantee performance. This paper is based on this situation, and its main purpose is to design a high-performance, highly flexible, and highly scalable CNC platform for small and medium-sized CNC systems. It aims to provide a practical solution for the development of small and medium-sized CNC systems. 2 System Scheme Design 2.1 System Block Diagram Generally, the application requirements of a CNC system mainly include two major parts: human-computer interaction and control. This system adds a system expansion module on top of these. The system design block diagram is shown in Figure 1. Figure 1 System Design Block Diagram 2.2 Selection Analysis The main analysis focuses on “embedded processor selection”, “dual ARM controller architecture” and “pulse transmission scheme”. (1) Embedded Processor Selection The core of embedded system hardware is various types of embedded processors. Currently, there are more than 1,000 types of embedded processors worldwide, with more than 30 popular architecture series. The address space is generally from 64KB to 64MB, the processor speed is from 0.1MIPS to 200MIPS, and the word length is from 8 bits, 16 bits to 32 bits. Currently, the most popular embedded processors are 8-bit C51 core microcontrollers and 32-bit high-performance processors. Under normal circumstances, the address space of a 51 core microcontroller is 64kB, and the machine cycle is 12 times the frequency of the crystal oscillator. Its application scope is mainly simple embedded control systems with low speed requirements and low code capacity requirements. Currently, the main 32-bit high-performance processors include PowerPC, 68K, MIPS, and ARM series. Among them, the ARM controller has become the industry-recognized embedded RISC processor standard due to its three major features: low power consumption, high cost performance, and high code density. Based on the above comparison, the ARM series controller was finally selected. (2) Selection basis of dual ARM controllers In this system, two ARM controllers are used. One is dedicated to human-computer interaction, parameter storage, and system expansion, while the other is focused on control. There are two main reasons for this selection: First, the data transmission speed of the most commonly used monochrome LCD controller SED1335 is very slow compared to ARM chips. After initial calculations and actual measurements, it takes about 130ms to refresh a 320*240 pixel image. Therefore, when the display task is heavy, the real-time performance of other tasks is difficult to guarantee, and the display speed of the LCD screen becomes the bottleneck of the entire system. There are two solutions to this problem: select a microcontroller with an integrated LCD controller or use two microcontrollers to handle human-computer interaction and control respectively. Generally, microcontrollers with integrated LCD controllers are generally expensive, so the second solution was adopted. By separating responsibilities, another CPU is dedicated to control, which greatly improves the real-time performance of the system and can meet more demanding system requirements. The second reason: By separating responsibilities, the parallelism of system design and the flexibility of modification are increased. While designing the control program, the design work of other modules can be carried out at the same time, and the two parts can be debugged separately without affecting each other. At the same time, when it is necessary to modify the system function, only the relevant controller side can be modified without affecting the function of the controller on the other side, thus making the function modification simple and easy. (3) Hardware selection of pulse transmission module The pulse transmission module in this system does not use a dedicated motor control chip, such as MCX314. The main reason is that such chips are expensive. Since the system control part is handled by a dedicated processor, the system performance will not be reduced as a result. [b] 3 System component design[/b] 3.1 Design and implementation of dual CPU communication module In dual CPU or multi CPU design, the collaborative work between CPUs is a problem that must be solved. Depending on the specific circumstances of different systems, there are different solutions. Generally speaking, there are the following solutions: (1) Dual CPU data lines are connected through bidirectional buffers, and several I/O lines are designed as handshake signals. This solution is relatively simple in hardware and has a relatively low cost, but it is easy to affect the design of other hardware modules, especially external memory. It needs to be carefully considered according to different CPUs to avoid conflicts. Moreover, this design makes the software design quite complex and is very prone to errors and conflicts, so this solution is rarely used. (2) Dual-port RAM solution. This solution adds a dual-port RAM between CPUs. CPUs can access the dual-port RAM at the same time and achieve data sharing through the dual-port RAM. The hardware connection diagram of this solution is shown in Figure 2. Dual-port RAM is generally very efficient when the amount of communication data between CPUs is large, and the data throughput is large. It is often used in some high-end products. However, the price of dual-port RAM is relatively expensive, which also limits its application to a certain extent. (3) Communication Interface Interconnection Scheme The communication interface interconnection scheme involves interconnecting two CPUs through an integrated or external communication interface to exchange data. This scheme is particularly suitable for CPUs exchanging data in the form of data packets. It is convenient and simple, allowing each CPU to independently debug its communication and other functions without interference and with minimal coupling. However, additional work is required to write the relevant communication interface driver and define the data communication protocol between CPUs. This scheme is cheaper than the dual-port RAM scheme, but its speed is lower. The communication interface interconnection scheme is shown in Figure 3. The communication media are described below: First, Ethernet. This communication method has a high speed, reaching 100Mbps, but the hardware cost is high and the software development workload is large. Therefore, this method is rarely used in dual-CPU collaborative designs to achieve data exchange between CPUs. Second, I2C and SPI interfaces. Both of these interfaces can be integrated into communication controllers in general controllers. This approach generally doesn't increase hardware costs, requiring only driver programming, but its communication speed is relatively low, making it suitable for applications with low data exchange volume and low speed requirements. This method is frequently used in embedded system design. Third, UART serial port. Serial port controllers are typically integrated into embedded controllers. In dual-CPU data exchange scenarios, no external level conversion chip is needed, thus this approach doesn't increase hardware costs; only driver programming is required. Similar to I2C and SPI communication, this approach has low data throughput and is unsuitable for applications requiring large amounts of data exchange. However, due to the widespread application and ease of operation of serial communication, this approach is still widely used in practical system design. Based on the above comparisons, this paper ultimately selects UART interface communication as the data exchange solution between dual CPUs. The wiring diagram for this solution is shown in Figure 4. 3.2 Human-Machine Interaction Module Design and Implementation The human-machine interaction module uses an LCD module (LCM) as the interface platform. The connection between the LCM and the controller is shown in Figure 5. The interface design is based on ZLG/GUI. ZLG/GUI is software designed specifically for simple graphical user interfaces in embedded systems. It has low resource consumption and is easy to use. It provides basic functions such as drawing points, lines, circles, arcs, ellipses, rectangles, squares, and filling. More advanced interface functions include ASCII display, Chinese character display, icon display, windows and menus, etc. It supports monochrome, grayscale, pseudo-color, and true color graphics display devices. 3.3 System Control Module Design and Implementation The hardware for operating the control module includes: digital input (DI), digital output (DO), 0-5V DA output, stepper motor pulse output, etc. Digital input/output and DA output control are relatively conventional. Here, we only analyze the stepper motor pulse output. In order to ensure that there are no impacts, step loss, overtravel, or oscillations during feeding, and to achieve fast and accurate movement according to the predetermined speed and position, the input pulses applied to the motor must be given according to a certain rule. This is acceleration and deceleration control. Common acceleration and deceleration curves include the following: stepped acceleration and deceleration curve, linear acceleration and deceleration curve, exponential acceleration and deceleration curve, and S-shaped acceleration and deceleration curve [3-4]. Each curve has different applicable occasions, and the specific method should be selected according to the specific application. Figure 7 is a screenshot of a set of pulses sent by the "linear acceleration and deceleration curve" scheme selected in this paper under the logic analyzer. 3.4 Communication Interface Design Scheme The addition of the "system expansion communication interface" is mainly to enhance the scalability of the system and facilitate the connection of other devices. The communication protocol of this communication interface is the Modbus protocol, which is widely used in industry, and the communication medium is the RS485 interface. The Modbus protocol specifies 1-255 function codes (some function codes are reserved), but the most commonly used are the Modbus codes. Therefore, this system only implements function codes 1-6. [b]4 Summary[/b] After fully studying the development and application status of CNC systems at home and abroad, this paper designs an efficient, inexpensive, and highly scalable CNC development platform to address the problem of difficulty in selecting small and medium-sized CNC systems, thus providing a reference and platform for the development and design of small and medium-sized CNC systems. Based on this platform, a stepper motor control system for the bag-making machine industry has been successfully developed. This system has been applied in actual industrial settings with excellent performance, high control precision, and a user-friendly interface. It is believed that as this development platform continues to mature and improve, it will find widespread application in the research and development of small and medium-sized CNC systems. References [1] Han Quanli, Ma Hongwei, Zhang Bin, et al. Open CNC system. Mechanical Design and Manufacturing Engineering, 2001, 30(1): 4-5. [2] Liao Degang. Research and development status of open CNC system. Machinery, 1999, 26(3): 13-15. [3] Hu Jianhua, Liao Wenhe, Zhou Rurong. Research and comparison of several acceleration and deceleration control curves in CNC system. Journal of Nanjing University of Aeronautics and Astronautics, 1999, 31(6): 706-711. [4] Jae Wook Jeon. Efficient acceleration and deceleration technique for short distance movement in CNC machine tools. ELECTRONICS LETTERS, 2000, 36(8): 766-768.