Implementation of Communication Function of Embedded CNC System

introduction

The market demands for CNC systems to be more flexible, adaptable, and expandable, and to the direction of miniaturization, intelligence, and networking. In response to this requirement, this paper proposes a networked embedded CNC system. The central CNC unit is not a PC computer system, but an embedded control system. This embedded control system adopts the structure of ARM+DSP and has strong computing power. The low cost feature improves the real-time and reliability of the system, and realizes the miniaturization, networking, intelligence and integration of the numerical control system. Other units of the embedded CNC system, such as the servo control unit, PLC unit, communication unit, display unit, data input unit, etc., are also built on the basis of the embedded system, belonging to the embedded system module. The communication part of the embedded CNC system includes the communication between the CNC main control unit and the servo drive and I/O logic control in the CNC system, the communication of the workshop-level industrial Ethernet network and the intranet/Internet network communication.

1. Overall structure of the system

The networked embedded CNC system has been jointly developed by Hubei Digital Engineering Key Laboratory and Embedded Laboratory of Wuhan University of Technology. The main control system CPU adopts Samsung's S3C44B0 microcontroller, and the system's machine control and interpolation operations and other strong real-time tasks are realized by TI's 32-bit TMS320F2812DSP chip. The U2cos11 real-time multitasking operating system was transplanted in ARM for real-time multitasking management. Its main task is to realize the man-machine interface of the numerical control system, complete the input of the machining program, pre-compile, track calculation, speed calculation and machining part graphics. The tasks such as simulation and simulation provide the industrial Ethernet interface to communicate with the upper management PC, and then connect the embedded CNC system to the Internet through the upper PC. The DSP is responsible for handling some real-time machine signals and performing strong real-time tasks such as machine control and interpolation calculations according to ARM instructions. The data (processing data) for interpolation is generated in the ARM and sent to the DSP through the CAN bus, and the interpolation processing is performed by the DSP. The servo unit mainly accepts the commands of the ARM and DSP to control the spindle motor and the feed motor. The architecture of the entire system is shown in Figure 1.


Figure 1 Architecture of the embedded CNC system

2. Implementation of communication function of embedded numerical control system

The network of CNC system is based on Internet technology, communication technology, numerical control technology and computer technology. It integrates remote design, numerical control programming and numerical control processing to realize the networking and integration of numerical control equipment such as numerical control system. As the basic unit of networked manufacturing system, embedded CNC system can realize centralized control management, remote control, remote fault diagnosis, network manufacturing, online training, online marketing and online management of manufacturing workshop equipment, so that it can be used globally. Linking companies with different types of CNCs to share and optimize the use of resources, not only can improve the processing quality and production efficiency of products, but also respond to the ever-changing market agilely [1]. The communication function in the embedded CNC system includes three aspects: communication between the CNC main control unit and the servo drive and I/O logic control in the CNC system, communication between the workshop-level industrial Ethernet network and intranet/Internet network communication. as shown in picture 2.


Figure 2 Communication structure of embedded CNC system

2.1 Communication between system units

The system ARM, DSP and each servo unit communicate through the CAN bus. The characteristics of the CAN bus determine that it is very suitable for architecture embedded CNC system. First, the CAN bus uses Cy2clicredundancy check, Frame check, ACK errors, and bus monitoring. Five kinds of error monitoring and error correction measures, such as Bus monito2ring) and Bit stuffing, achieve high reliability, and the average bit error rate is less than 10-13 [2]. Second, the CAN bus uses a unique bit arbitration technique that has higher real-time performance than the CSMA/CD network (IEE802.3) and Token Ring (IEE802.4). In addition, the communication speed of the CAN bus can reach 1MBPS, and the long-distance transmission can reach 10km. At the same time, the interface is simple, the installation is convenient, and the communication control is simple. In the embedded CNC system, ARM, DSP and servo unit all implement the CAN bus interface, which can be used as a node of the system, which is very convenient to implement module addition, change and exit.

The main control CPU of the embedded CNC system uses Samsung's S3C44B0 microcontroller. The chip does not have CAN bus protocol control and driver core. Therefore, PHILIPS' SJA1000CAN controller and 82C250 bus transceiver are selected. SJA1000 supports CAN2.0A/B protocol, which can easily interface with S3C44B0. CAN interface circuit shown in Figure 3, SJA1000 integrates the physical layer and data link layer functions of the CAN protocol, can complete the framing processing of communication data, the controller has multi-master structure, bus access priority, hardware filtering, etc. Features. PCA82C250 is the interface between CAN protocol controller and physical bus. It can provide differential transmission capability and receiving capability of bus. High-speed application can reach 1MHz and can hang 110 nodes.

The powerful real-time tasks such as machine control and interpolation calculation of the embedded CNC system are realized by DSP. The interpolation operation hardware adopts TI's 32-bit TMS320F2812 chip, its maximum frequency can reach 150MHz, and the clock cycle is shortened to 6.67ns, which fully meets the real-time performance of the CNC interpolation algorithm [3]. At the same time, the 2812 chip integrates the CAN bus controller internally, so the external only needs to connect the 82C250 bus driver. All protocols for data transmission and acceptance filtering are implemented by the on-chip CAN bus controller. The special function registers in the 2812 chip can be used to configure the CAN controller to access the received data and perform data transmission. Since the 2812 chip can complete all functions of the data link layer and application layer of the CAN bus protocol, it is very convenient to access the CNC system based on the CAN bus.


Figure 3 CAN interface circuit of embedded CNC system

Considering that the servo motor of the numerical control system has DC, AC and stepping motors, the reconfigurability of the servo module is of great significance. The servo control module is also attached to the system via the CAN bus, and is implemented by a DSP chip. Since the 20MHz clock frequency is sufficient for servo control, considering the cost problem, the system uses the TMS320F243 chip produced by TI as the servo CPU instead of the 2812 chip. The 243 chip is one of the TMS320 series of fixed-point digital signal processors. It is designed for digital motor control. Its instruction execution speed is 20MHz. All instructions can be executed in a single 50ns cycle, which makes real-time complex control algorithms. Execution is possible. In addition, the CAN module is embedded in the 243 chip, so it can be easily connected to the CAN bus.

2.2 Workshop-level industrial Ethernet communication

The key technology for communication at the shop floor industrial Ethernet network is the implementation of the underlying Ethernet protocol. Since the S3C44B0 chip does not have an integrated TCP/IP protocol module, an external network protocol chip is required. The network port of the embedded CNC system uses 10M Ethernet interface chip RTL8019AS, RJ45 network socket and network transformer to reduce interference. The Ethernet interface module is basically the same as the network card function and circuit structure used in the PC, except that the embedded CNC system and the network module part are not connected by PCI/ISA plug and play, but directly with the Ethernet interface chip RTL8019AS. The data bus is connected to the address bus. The interrupt output INT0 (4 pins) of the RTL8019AS is connected to the EINT0 (external interrupt source 0) of the S3C44B0X. The RTL8019 reports its own working status in an interrupted manner, such as sending a packet successfully, receiving a new packet, and interrupting an abnormal interrupt. After receiving the EINT0 interrupt, the S3C44B0X reads the value of the internal register ISR of the RTL8019AS after entering the corresponding interrupt handler, thus determining what caused the interrupt. Since the connection diagram of the circuit is large, a specific circuit diagram is not given here.

When developing the Ethernet driver, you only need to write the data to be sent to the chip in a certain format and start the send command. The RTL8019AS will automatically add the receive status, the next page pointer, the Ethernet frame length, and the check FCS segment. The packet is converted to a physical frame format for transmission on the physical channel. Conversely, after receiving the physical signal, the RTL8019AS restores it to data and stores it in the chip RAM in the specified format for the host program to access. Thus the work of the RTL8019AS is to complete the mutual conversion between the data packet and the electrical signal: the data packet <=> electrical signal. RTL8019AS has a total of 32 input and output addresses, and the address offset is 00H4/1FH. Among them, 00H - 0FH has 16 addresses, which are register addresses. The register is divided into 4 pages of PAGE04/PAGE3. The NE2000-compatible registers are only 3 pages (Page0-Page2) ), in order to ensure that the driver is valid for all Ne2000 network cards, the system does not use the fourth page of the register. The Ethernet protocol is automatically completed by the RTL8019AS chip hardware and is transparent to the upper layer application. The driver has three functions: chip initialization, receiving, and sending packets. The data packet is sent to the network card chip RAM by the DMA write operation, and the first address of the transmission buffer (TPSR0, TPSR1) and the packet length (TBCR0, TB2CR1) are given, and the transmission command is started, and the network card chip is sent. The transmission is automatically completed by the Ethernet protocol and the result is written to the status register. When receiving a data packet, the interrupt is used to read whether the new data packet is received according to the value of the internal register ISR of the RTL8019AS, and if so, the data is read from the network card chip RAM by the DMA read operation.

2.3Intranet/Internet network communication

Intranet/Internet network communication refers to the communication between the CNC system and the host computer in the enterprise. The embedded CNC system, the upper management PC and the office network are connected through the Intranet and then connected to the external Internet. In this way, the MRP system, MIS system and CAD/CAM system of the office are integrated into the whole through the Intranet, and the information exchange and control with the CNC machine tool can be conveniently and quickly exchanged. It can be designed, programmed, and then transmitted and shared via Ethernet. The part processing program realizes the network integration of CAD/CAM/CNC. At the same time, through the Internet, the numerical control equipment, field equipment maintenance engineers, equipment manufacturing enterprise maintenance engineers and domain experts distributed in different regions are organized and linked, and rapid information transmission between equipment and people and between people is formed to form a Networked CNC equipment diagnostic and maintenance consulting system and video conferencing system, remote monitoring and fault diagnosis of CNC equipment, can also form an online virtual workshop (factory) and e-commerce.

The system's video-based remote service provides a coordinated working environment including voice, image, text and other media, and is an important tool for remote collaboration. The remote monitoring module collects the sound, image and other information of the digital processing site in real time through the CCD camera, and publishes it to the network in the form of streaming media in time to provide a real processing environment for the remote monitoring user, so that the remote user has an immersive environment. feel. The platform adopts a browser/server mode video conference monitoring system implementation scheme, as shown in FIG. 4 .


Figure 4 is based on remote monitoring of video technology

The platform adopts a 3-layer B/S structure. The first layer in the 3-layer structure is the user layer. The user completes the remote service and information sharing of the system through the browser. The second layer is the web server layer, which is the contact browser and the database server. The link is used to store the functional modules and applications of the system; the third layer is the database server layer, which is used to store various data required by the system. User and manufacturer share data and information over the Internet. The local computer and the remote server are connected via the Internet, and the local user only needs to communicate with the remote service center server through the browser. This enables immediate processing of real-time information without significant delays. In the specific operation, the browser transmits the data of the production site to the web server of the manufacturing enterprise through the Internet, and the user sends a control command through the functional component on the virtual control panel, and displays the numerical control simulation process and feedback information through the monitoring display component on the control panel. When the production CNC machine tool fails and needs the remote diagnosis center of the manufacturing enterprise to provide the service, the browser transmits the fault signal data to the manufacturing enterprise web server, and the web server contacts the database, and uses the diagnostic knowledge of the expert system for reasoning and diagnosis. And return the diagnosis result to the client.

3. Summary and outlook

While the CNC system is developing in the direction of precision, networking, intelligence and integration, it is also developing in the direction of miniaturization and embedded. The embedded CNC system adopts the “tailor-made” method to embed the required functions into the application system. It is the future development direction of CNC and motion control products. It is the ideal for the transition from 16-bit to 32-bit in the economical CNC system that dominates China. select. This paper introduces the communication between the CNC main control unit and the servo drive and I/O logic control in the embedded CNC system, the communication of the workshop-level industrial Ethernet network and the intranet/Internet network communication, and gives the key technology implementation. Subsequent work is a wireless network solution developed for embedded CNC machine tool networking applications, making the connection between the CNC system and the outside faster, safer and more convenient.

Integrated Submersible UV Lamp

Submersible Uv Lamp,Submersible Uv Light,Roxin Uv Light,Uv Spotlight Bulb

Foshan Kingrate Optoelectronic Technology Co., Ltd. , https://www.kingrateuv.com