Three minutes to master the embedded WebServer technology and its implementation

The rapid development of embedded technology has been widely used in all walks of life. The combination of embedded technology and numerical control technology has produced a lot of theory and application results. However, with the increasing complexity of machined parts, it is more and more urgent to establish a consistent system architecture for embedded CNC systems. Without an architecture to provide general method guidance, integrating a wide variety of hardware and software modules into a CNC system would be a very tedious and error-prone task. The embedded CNC system architecture is to provide integrated rules and interface specifications for each module. Through these integration rules and interface specifications, different developers can build common modules. Using common modules and general integration rules, different embedded CNC systems can be constructed, which are integrated by the CNC system into industrial control stations, from industrial control stations to industrial control networks and even more complex systems. The embedded digital control architecture can improve the flexibility, reliability, security and openness of the system. The National Institute of Standards and Technology (NIST) is committed to establishing a reference architecture for various mechanical control systems [1]. This paper studies the hardware architecture and software architecture of the embedded CNC system. Combined with the work done, an example of this architecture is introduced.

Embedded CNC System Hardware Architecture

Embedded digital control system hardware architecture shown in Figure 1.

Three minutes to master the embedded WebServer technology and its implementation

Figure 1 embedded CNC system hardware architecture

The embedded CNC system must include a programmable computing component, or it can contain multiple components to form a multi-CPU system. There are many types of embedded processors or controllers. The most commonly used ones are ARM, embedded X86, and MCU. The processor is the entire system operation and control center. Its architecture increasingly uses the RISC instruction set Harvard architecture. Programmable computing components, several years ago, were single finger processors or microcontrollers, but now other programmable computing resources such as FPGAs have been added.

The CNC system must interact with the operator. There must be a display hardware, which can be a CRT display. However, the LCD controller is usually integrated in the embedded processor. It provides a Dual-Layer Super Twist NemaTIc (Dual-Layer Super Twist NemaTIc) LCD. ) or TFT (Thin Film Transistor, thin film transistor LCD) display interface, through which you can directly drive the LCD screen.

With the promotion of the use of USB mobile storage devices, the platform implements support and control of USB devices through a USB host controller. A USB client controller may also be integrated in the processor to facilitate the implementation of the USB client interface. Generally, the application software debugging between the host computer and the platform is performed through this interface.

The serial port is used to realize the communication between the upper and lower computers. In some servo drives, it also provides the serial port connection. Therefore, it can also be connected to the drive through the serial port.

The external memory bus interface supports a variety of external memories: SDRAM, RAM, and flash memory. SDRAM is generally used for memory. The flash memory is a type of non-volatile memory that retains on-chip information after the power is turned off. This is used to store the CNC system program. And preparation data.

Feed axis interface is the bridge between CNC system and feed servo system. As far as the servo control system often used at this stage is concerned, the feed control interface generally has a serial interface, a pulsed interface, an analog interface, and the like.

The spindle control interface connects the CNC system to the spindle drive unit. It consists of two parts: the spindle speed control output and the spindle encoder input.

The PLC integrated in the CNC system is a built-in type. It has the characteristics of flexible design, compact structure, and strong pertinence. It mainly completes the S code of the spindle speed, the T code of the tool function, and the control of the positive and negative rotation of the spindle and the start and stop, spindle change. File, coolant switch, chuck elasticity and other M code.

The sensor interface is used to detect the position information of the machine and realize the calculation input of various control algorithms.

The development of modern manufacturing engineering requires that NC systems should be able to interconnect through the network, pass commands and data information, and complete the NC tasks in parallel. Therefore, the Ethernet module is added so that the CNC system can be networked when needed.

Each of the above function modules is connected through a standard bus and a uniform bus interface specification is implemented. Some functional modules in this architecture are not required for every embedded numerical control system and can be reduced according to specific requirements.

Incoming CNC system software architecture

The embedded NC system software architecture is shown in Figure 2:

Three minutes to master the embedded WebServer technology and its implementation

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 of NCAPI and operation interface components to achieve the two levels of machine tool factory and user respectively.

The part of the underlying module other than the PLC is not open to the outside world. Non-system developers can use the underlying functions through NCAPI. The underlying module completes the interpolation tasks (rough interpolation, fine linear segment interpolation, single segment, skip segment, parallel block processing); PLC task (alarm processing, MST processing, emergency stop and reset processing, virtual axis driver, Tool Life Management, Incident Handling); Position Control Tasks (Backlash Compensation, Pitch Compensation, Limit Position Control, Position Output); Servo Tasks (Control of Servo Output, Inputs) and Common Data Area Management (Control of All Resources in the System Information Management). Therefore must have multi-task processing capabilities, namely; task establishment; cancellation; scheduling; wake-up; blocking; suspension; activation; delay processing capabilities; create semaphores; release semaphores; ability to take semaphore values.

The upper layer software is responsible for editing, interpretation of the part program, setting of parameters, status display of the PLC, MDI and fault display, processing trajectory, display of processing program lines, etc., and data exchange through the shared memory, FIFO and interrupt and the underlying module. The upper software module includes: interpreter module, MDI operation module, program editing module, automatic processing module, parameter editing module, PLC display module, fault diagnosis module and so on.

The NC application software development interface (NCAPI) is a universal interface function for different machine tools and different requirements. On this basis, a specific numerical control system can be easily developed, such as the Huazhong I milling machine numerical control system, Century Star lathe CNC system and so on. NCAPI is consistent with the API interface provided by the original China Central Type I. The unified API guarantees the system's portability and interchangeability of modules; the configuration function in the system development integrated environment can achieve system performance scalability by configuring different software modules, and the scalability of system performance is ensured through the replacement of system hardware. .

Applications

According to the above classification of the embedded architecture, this article has developed an embedded CNC system based on embedded PC and LINUX operating system.

The CPU uses an embedded PC unit and is embedded in the CNC motherboard through the PC104 bus. On the NC motherboard, inherited switch interface circuit, MCP, MDI keyboard interface circuit, feed axis interface circuit and spindle interface circuit. Each interface circuit is centrally controlled by the core device FPGA chip. In order to meet the openness requirements of the CNC device, the CNC motherboard adopts a dual FPGA design. An FPGA chip controls the switch interface circuit, MCP, MDI keyboard interface circuit, spindle interface circuit, serial port servo drive interface circuit; another FPGA chip is responsible for controlling the pulse amount servo drive device or stepper motor drive device interface circuit. Analog servo drive interface circuit. Two FPGA chips are controlled by a PC/104 bus embedded PC. Using the flexibility of the FPGA chip, without changing the hardware circuit, by changing the firmware of the FPGA chip and the two FPGA chips can be flexibly collocated, different configurations of the numerical control device can be constructed.

The operating system is to make it a real-time operating system by transforming the Linux kernel. The specific approach is to embed a hardware abstraction layer in the Linux operating system to take over all interrupts and hardware operations. Because Linux adopts a monolithic modular structure, tasks that require real-time response in CNC system tasks are made into numerical real-time modules and embedded in the Linux kernel. These tasks include: periodic tasks such as servo monitoring, PLC, and position control, and interpolation. The periodic tasks, tool compensation, decoding and network basic functions are packaged into a numerical control application program interface.

On the basis of the real-time Linux software platform, the discrete-point I/O control APIs, sensor APIs, and position controller APIs included in the application software platform are common API interfaces. The three parts of process control, human-machine interface, system integration and configuration support environment included in the application layer only need to replace the corresponding module communication interface with the relevant system API of the real-time Linux operating system, and the upper application module may not be modified. At the same time, the application software platform has a good openness, users can customize the API to expand the system function support, this article in the application platform layer custom a digital graphics library API, used to support the graphical display of the CNC system.

Conclusion

This open embedded CNC system architecture proposed in this paper, on the hardware, the standard bus shields the differences between the various functional components, the different functions of the numerical control hardware is defined by the standard signal specification. In software, the embedded real-time operating system provides a system interface for NC application software, shielding hardware details, and providing a real-time, reliable, multi-tasking operating environment. The software architecture is layered on the whole, making the architecture clear and clear; the modularization of the functions within the layers minimizes the coupling of the modules, which makes the software reusability very good and facilitates the function reduction and system maintenance of the CNC system. It not only ensures the openness and stability of the hardware platform, but also makes software migration and design more convenient.

Metro Energy Feedback Transformer

Metro Energy Feedback Transformer,Dry-Type Power Transformer,Scb Power Transformer,Energy Feedback Transformer

SANON DOTRANS Co., Ltd. , https://www.sntctransformer.com