The embedded CNC system architecture is to provide integration rules and interface specifications for each module. Through these integration rules and interface specifications, different developers can build common modules. Using common modules and common integration rules, different embedded CNC systems can be built, from CNC systems to industrial control stations, from industrial control stations to industrial control networks and even more complex systems. The embedded CNC system architecture can improve the flexibility, reliability, security and openness of the system.
This paper studies the hardware and software architecture of embedded CNC systems, and introduces an example of this architecture based on the work done.
1 Hardware Architecture of Embedded CNC System
The hardware architecture of the embedded CNC system is shown in Figure 1.
Figure 1 Hardware architecture of embedded CNC system
Embedded CNC systems must contain a programmable computing unit, or multiple units to form a multi-CPU system. There are many types of embedded processors or controllers, the more commonly used ones are ARM, embedded X86, MCU, etc. The processor is the computing and control center of the entire system, and its architecture is increasingly tending to adopt the RISC instruction set Harvard architecture. A few years ago, the programmable computing unit was only a processor or microcontroller, but now it has been added with other programmable computing resources such as FPGA.
In order for the CNC system to interact with the operator, it must have a display hardware, which can be a CRT display, but generally the LCD controller is integrated in the embedded processor, which provides an interface with the DSTN (Dual-Layer Super Twist Nematic) or TFT (Thin Film Transistor) display, through which the LCD display can be directly driven.
With the promotion of the use of USB mobile storage devices, the platform supports and controls USB devices through the USB host controller. The processor may also integrate a USB client controller to facilitate the implementation of the USB client interface, which is generally used to debug application software between the host computer and the platform.
The serial port is used to realize communication between the upper and lower computers. Some servo drive devices also provide serial port connection, so it can also be connected to the drive through the serial port.
The external memory bus interface supports various external memories: SDRAM, RAM and flash memory. SDRAM is generally used as the memory. Flash memory is a type of non-volatile memory that can still maintain information on the chip after the power is turned off. It is used here to store CNC system programs and configuration data.
The feed axis interface is the bridge between the CNC system and the feed servo system. As far as the servo control system commonly used at this stage is concerned, the feed control interface generally includes serial interface, pulse interface, analog interface, etc.
The spindle control interface connects the CNC system with the spindle drive unit, and it consists of two parts: spindle speed control output and spindle encoder input.
The PLC integrated in the CNC system is built-in, with the characteristics of flexible design, compact structure and strong pertinence. It mainly completes the S code for spindle speed, T code for tool function and M code for controlling spindle forward and reverse rotation, start and stop, spindle gear shifting, coolant switch, chuck tightness, etc.
The sensor interface is used to detect the position information of the machine tool and realize the calculation input of various control algorithms.
The development of modern manufacturing engineering requires that CNC systems should be able to interconnect through the network, transmit commands and data information, and complete CNC tasks in parallel. Therefore, an Ethernet module is added to enable networking of CNC systems when needed.
The above functional modules are connected through a standard bus and implement a unified bus interface specification. Some functional modules in this architecture are not required for every embedded CNC system and can be reduced according to specific requirements. [page]
2 Embedded CNC System Software Architecture
The software architecture of the embedded CNC system is shown in Figure 2:
Figure 2 Embedded CNC system software architecture
The software architecture of embedded CNC system is divided into two parts: system platform and application software. The upper application software is divided into two levels: CNC application programming interface (NCAPI) and operation interface components, which are open to machine tool manufacturers and users respectively.
The bottom module is not open to the public except for PLC. Non-system developers can use the bottom functions through NCAPI. The bottom module completes interpolation tasks (coarse interpolation, fine interpolation of micro straight line segments, single segment, jump segment, parallel program segment processing); PLC tasks (alarm processing, MST processing, emergency stop and reset processing, virtual axis driver, tool life management, emergency event processing); position control tasks (gear clearance compensation, pitch compensation, limit position control, position output); servo tasks (control servo output and input) and public data area management (control information management of all resources in the system). Therefore, it must have multi-task processing capabilities, namely; task establishment; cancellation; scheduling; wake-up; blocking; suspension; activation; delay processing capabilities; the ability to create semaphores; release semaphores; and the ability to obtain semaphore values.
The upper software is responsible for the editing and interpretation of part programs, parameter setting, PLC status display, MDI and fault display, processing trajectory, display of processing program lines, etc., and exchanges data with the bottom modules through shared memory, FIFO and interrupts. The upper software modules include: interpreter module, MDI operation module, program editing module, automatic processing module, parameter editing module, PLC display module, fault diagnosis module, etc. The
CNC application software development interface (NCAPI) is a general interface function provided for different machine tools and different requirements. On this basis, specific CNC systems can be easily developed, such as the Huazhong I type milling machine CNC system, Century Star lathe CNC system, etc. NCAPI is consistent with the API interface provided by the original Huazhong I type. The unified API ensures the portability of the system and the interchangeability of modules; the configuration function in the system development integrated environment can achieve the scalability of system performance by configuring different software modules, and the scalability of system performance is guaranteed by replacing the system hardware.
3 Application Examples
According to the above-mentioned hierarchical division of embedded system architecture, this paper develops an embedded CNC system based on embedded PC and LINUX operating system.
The CPU adopts an embedded PC unit and is embedded in the CNC motherboard through the PC104 bus. On the CNC motherboard, the switch interface circuit, MCP, MDI keyboard interface circuit, feed axis interface circuit and spindle interface circuit are inherited. Each interface circuit is centrally controlled by the core device FPGA chip. In order to meet the requirements of CNC device for openness, the CNC motherboard adopts a dual FPGA design. One FPGA chip is responsible for controlling the switch interface circuit, MCP, MDI keyboard interface circuit, spindle interface circuit, and serial port servo drive device interface circuit; the other FPGA chip is responsible for controlling the pulse servo drive device or stepper motor drive device interface circuit, and the analog servo drive device interface circuit. The two FPGA chips are controlled by the PC/104 bus embedded PC. By taking advantage of the flexibility of the FPGA chip, without changing the hardware circuit, by changing the firmware of the FPGA chip and flexibly matching the two FPGA chips, CNC devices with different configurations can be constructed.
The operating system is made into a real-time operating system by modifying the Linux kernel. The specific method is: embed a hardware abstraction layer in the Linux operating system to take over all interrupts and hardware operations. Since Linux adopts an integrated modular structure, the tasks that require real-time response in the CNC system are made into CNC real-time modules and embedded in the Linux kernel. These tasks include: servo monitoring, PLC, position control and other periodic tasks and interpolation, which is a non-periodic task. Tool compensation, decoding and basic network functions are packaged into CNC application program interfaces.
Based on the real-time Linux software platform, the discrete point I/O control API, sensor API, position controller API and other interfaces included in the application software platform are general API interfaces. The three parts of the application layer, process control, human-machine interface and system integration and configuration support environment, only need to replace the corresponding module communication interface with the real-time Linux operating system related system API, and the upper application module can be left unchanged. At the same time, the application software platform has good openness, and users can customize APIs to expand system function support. This paper customizes a CNC graphics library API at the application platform layer to support the graphics display function of the CNC system.
4 Conclusion
The open embedded CNC system architecture proposed in this paper uses a standard bus to shield the differences between functional components in hardware, and CNC hardware with different functions is defined by standard signal specifications. In terms of software, the embedded real-time operating system provides a system interface for CNC application software, shields hardware details, and provides a real-time, reliable, and multi-tasking operating environment. The software architecture is generally layered, making the architecture clear; the layers are modularized by function, minimizing module coupling, making the software reusable, and facilitating CNC system function reduction and system maintenance. It not only ensures the openness and stability of the hardware platform, but also makes software transplantation and design more convenient.
Previous article:Remote Automatic Rainfall Monitoring Network Based on GPRS
Next article:Leverage efficient programming techniques to take advantage of multi-core architectures
- Popular Resources
- Popular amplifiers
- Detailed explanation of big data technology system: principles, architecture and practice (Dong Xicheng)
- Multi-port and shared memory architecture for high-performance ADAS SoCs
- Machine Learning: Architecture in the Age of Artificial Intelligence
- Research and design of electric vehicle drive motor ECU control software based on AUTOSAR
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- DSP28335 performs FFT Fourier transform
- The most mainstream QI wireless charging schematic in 2022
- Thank you + family @【chat, laugh, make noise】
- Learning methods and experience of embedded systems
- I would like to know the functions of these two components, about switching power supply.
- Molex's compact Type-C connector saves valuable space in your design! Download and get a gift! Event starts now
- Knowledge about power amplifiers in RF chips
- Altium Designer 3D View Problem
- [National Technology N32G457 Review] RT_Thread Studio failed to mount spi1 after configuring SPI
- RT-Thread operating system μC/OS-III compatibility layer