Embedded CNC system hardware and software architecture

Publisher:beta12Latest update time:2014-01-07 Source: eefocusKeywords:Architecture Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
The combination of embedded technology and CNC technology has produced many theoretical and application results. However, as the complexity of machine tool processing parts increases, it is more and more urgent to establish a consistent architecture for embedded CNC systems. Without a common methodological guidance provided by the architecture, integrating various software and hardware modules into CNC systems will be a very arduous and error-prone task.

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.

Keywords:Architecture Reference address:Embedded CNC system hardware and software architecture

Previous article:Remote Automatic Rainfall Monitoring Network Based on GPRS
Next article:Leverage efficient programming techniques to take advantage of multi-core architectures

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号