Research on Networking of Embedded CNC System Based on CAN Bus

Publisher:TechGuru123Latest update time:2014-12-15 Source: e-works Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Preface

    In recent years, with the application of fieldbus technology and embedded technology in the field of industrial control, it has brought great changes to the entire manufacturing industry and greatly improved the level of productivity development. This paper designs an embedded CNC system based on the ARM9 series microprocessor S3C2440 and the professional motion chip MCX314As, and transplants the tailored open source Linux operating system into the microprocessor to enable it to have multi-task processing capabilities. The CNC system has the advantages of simple structure, low cost, high interpolation accuracy, etc. It is an economical CNC system that meets the new generation of open standards. By expanding the CAN bus interface circuit on ARM, the embedded CNC system is networked using CAN bus technology to form a LAN CNC processing network based on CAN bus. CAN bus has outstanding reliability, real-time and flexibility in data communication, and is particularly suitable for the interconnection of industrial field automation equipment. According to the actual situation, considering the special requirements of internal CNC networking processing in the enterprise, the use of CAN bus to connect the industrial field embedded CNC system is of great significance to the construction of a new type of LAN embedded CNC system.

1 Hardware structure of the network system

    The overall block diagram of the networked embedded CNC system based on CAN bus designed in this paper is shown in Figure 1: In the industrial field, an industrial computer or an industrial laptop can monitor the embedded CNC system connected to the CAN bus. By installing the monitoring software on the main monitoring computer, the CNC machining program is processed to obtain the data files required for machining. The monitoring computer can be connected to the CAN-bus network through the USB bus through the USBCAN intelligent CAN interface card to transfer the machining data files to the embedded CNC system. S3C2440 receives the machining data files from the CAN bus through the extended CAN bus interface circuit, and then starts the data transmission processing program, and transmits the data to the motion control chip MCX314As through the bus interface to realize the control of MCX314As. MCX314As performs corresponding interpolation calculations on the received data processing files and then outputs pulse levels to control the motor operation.

 Click to enlarge image

Figure 1 Overall block diagram of system architecture

    Overall structure of embedded CNC system The embedded CNC system mainly consists of ARM9-based S3C2440 main control board and professional motion control chip MCX314As. Its hardware structure diagram is shown in Figure 2.

 Click to enlarge image

Figure 2 Hardware structure diagram of embedded CNC system

    The main frequency of the microprocessor S3C2440 can reach up to 533MHz, which fully meets the multi-task processing requirements of the CNC system. The chip is based on the ARM920T core, adopts a 5-stage pipeline and Harvard structure, and has the advantages of small size, low power consumption, low cost, and high performance. MCX314As is a powerful motion control chip. It is a single chip that can control 4-axis pulse sequence output to drive servo motors and stepper motors. Linear and circular interpolation can be performed on any two axes.

2 CAN controller hardware structure

    The S3C2440 main control board does not have an integrated CAN controller circuit. The CAN bus interface can be expanded through the SPI bus interface to achieve data communication between the microprocessor and the CAN bus controller, so that the embedded CNC system can be connected to the CAN bus network. The CAN controller expansion circuit is shown in Figure 3. The microprocessor communicates with the MCP2510 through the SPI interface.

 Click to enlarge image

Figure 3 CAN controller circuit schematic

    The CAN protocol controller uses the MCP2510 controller, which supports technical protocol specifications such as CAN2.0A and CAN2.0B. MCP2510 can be powered in the range of 3V to 5.5V, so it can be directly connected to a 3.3VI/O embedded processor. The system structure is simple, and the SPI serial interface between the processor reduces the physical connection of the bus and improves the reliability of the system. It can send and receive standard and extended messages, and the communication rate can reach 1Mb/s. MCP2510 also includes three transmit buffers and two receive buffers, which can reduce the management burden of the microprocessor. The data transmission rate of its SPI bus interface can reach 5Mb/s.

    The CAN bus transceiver uses TJA1050. The design of TJA1050 uses the latest EMC technology. It uses advanced insulating silicon technology for processing and has good anti-electromagnetic interference performance.

    Write the driver of CAN bus controller MCP2510 in Linux operating system. The design of CAN bus communication program can be divided into three modules: sending data, receiving data and interrupt processing. Tests prove that the written CAN driver is correct.

3 Software Structure of Network System

    The networked software structure of the embedded CNC system based on the CAN bus mainly refers to the preprocessing part of the CNC machining code on the industrial computer. This part of the functions includes reading in the NC machining program, editing the NC machining program, lexical checking, syntax checking, decoding, tool compensation processing and data saving. The processed data is stored in a fixed format data file in turn. If there are fixed loops, jump instructions and special point intersections, the corresponding subroutine is required for processing, and then the data is modified in the data. The preprocessing flow chart of the CNC machining code by the industrial computer is shown in Figure 4. After starting the system software, the system first loads the data information saved after the last system operation and the system status information, and prompts whether to perform zeroing of the origin, etc. Then the system calls in the CNC machining program and performs syntax, lexical and other checks. After the check is correct, the corresponding algorithm is used to calculate according to the preparation function word, auxiliary function word, T function, H function, etc. of the CNC machining program segment, so as to obtain data with tool compensation, and these data and the corresponding preparation function word, auxiliary function word, tool number, tool compensation number and other function words are saved in a fixed format data file. After the industrial computer has processed the data, it will transfer the data to S3C2440 through the CAN bus. Then S3C2440 will process the data accordingly and send it to the motion control board through the bus interface. The motion control board will output control pulses to the servo system through complex interpolation calculations to control the motor.

 Click to enlarge image

Figure 4 Flowchart of preprocessing of CNC machining code by industrial computer

4 Conclusion

    With the widespread application of fieldbus and embedded technology in the control field, CAN bus has become the mainstream of industrial network with its significant advantages such as high reliability, strong real-time performance and easy implementation. The designed embedded CNC system based on ARM and motion control chip has good openness, high performance and low cost. The networked architecture of embedded CNC system based on CAN bus can realize online automatic monitoring of the processing process of multiple CNC machine tools. The system has high integration, high intelligence, good structural and functional scalability, and is safe and reliable. The transformation of this research result has a certain positive role in promoting the networked embedded CNC system and has positive reference significance for the future development of flexible manufacturing system (FMS).

Reference address:Research on Networking of Embedded CNC System Based on CAN Bus

Previous article:PWM output program of LPC210X
Next article:Stepper Motor Control System Based on Cortex-M3 Processor

Recommended ReadingLatest update time:2024-11-16 13:55

S3C2440 timer configuration
The relevant registers for timer configuration are as follows (listed in the order of the s3c2440 manual) 1. TCFG0: Timer Configuration Register 0 Function: Define the dead zone length of the device and set the pre-calibrator value Description: Bits set the pre-calibrator value for timers 0 and 1, an
[Microcontroller]
ARM920T (S3C2440) interrupt system
The difference between IRQ interrupt and fast interrupt FIQ The ARM920T core has two interrupts: IRQ interrupt and fast interrupt FIQ FIQ and IRQ are two different types of interrupts. In order to support these two different interrupts, ARM provides corresponding processor modes called FIQ and IRQ (ARM has 7 process
[Microcontroller]
Ethercat implementation based on S3C2440
  1 Introduction   Industrial Ethernet refers to the industrial Ethernet network created by Xerox and developed by Xerox, Intel and DEC due to its low cost, easy networking, relatively high data transmission rate, strong resource sharing capabilities and easy Internet connection. The jointly developed baseband LAN spe
[Microcontroller]
Ethercat implementation based on S3C2440
S3C2440 development board practice (2): start.S initial understanding + SDRAM configuration + relocation
1. Watchdog part Without further ado, let's start the configuration. First, we need to turn off the watchdog that is not in use temporarily. Find the watchdog register: WTCON, and set its position 0 to 0, that is, disable the watchdog: #define pWTCON 0x53000000 //WTCON address   ldr r0, =pWTCON mov r1, #0x0 str r1,
[Microcontroller]
S3C2440 development board practice (2): start.S initial understanding + SDRAM configuration + relocation
S3C2440 startup method
S3C2440 supports both NOR flash and NAND flash boot modes, which are controlled by pins OM1 and OM0. If it is booted from nor flash, because after reset, ARM sets the PC pointer to 0, then nor flash must be connected to bank 0. If it is booted from nand flash, S3C2440 does this, the nand flash controller
[Microcontroller]
Burning Program in S3C2440
Take JZ2440 development board as an example, burn the program to S3C2440. You can use dnw software to burn. Under Windows, the dnw driver is usually not installed well, and it is usually necessary to disable the digital signature to install it. So we can install dnw under Linux and burn the program under Linux.  Fir
[Microcontroller]
s3c2440 bare metal-resistive touch screen programming (3. Initialization and interrupt service program framework of touch screen TSC)
1. ADC interrupt generation process   Interrupt source: Here ADC and TSC share an interrupt source.   SRCPND indicates which interrupt source generated the interrupt request.    INTMODE: configure interrupt mode   Configure interrupt mask register   Interrupt pending register (used to display the current h
[Microcontroller]
s3c2440 bare metal-resistive touch screen programming (3. Initialization and interrupt service program framework of touch screen TSC)
s3c2440 bare metal - resistive touch screen - 2 - touch screen TS controller
Touch screen interface mode Normal Conversion Mode: Normal conversion mode, in general, you can configure ADCCON and ADCDAT0 to read data. 2. Separate X/Y position conversion Mode: In the x and y coordinates separate conversion format, the x coordinate will be written
[Microcontroller]
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号