Research on Multi-Axis Motion Control Based on SJA1000 Fieldbus
2026-04-06 07:30:07··#1
Abstract: With the development of information technology in manufacturing processes, the application of fieldbus technology is becoming increasingly widespread. This paper discusses the problems of using traditional motion control systems in electronic manufacturing equipment, introduces the main features and internal structure of SJA1000, proposes a fieldbus multi-axis motion control system based on SJA1000, and finally designs a hardware system for CAN bus communication based on SJA1000. Keywords: Motion control, CAN bus, networking, SJA1000 1 Introduction Motion control plays a crucial role in industrial production. Servo control is an important branch of motion control. Especially since the 21st century, the market demand for servo control products has been booming, with various industries showing increasingly strong demand for servo control products, while people's requirements for the performance of servo control systems are also increasing. Fieldbus, as an advanced industrial control technology, brings the concepts of network communication and information management to the field of industrial control. Individual, distributed measurement and control devices become network nodes, connected by the fieldbus to form a network system and control system that can communicate information and jointly complete automatic control tasks. It is the bottom-level control network of the factory. According to the international IEC1158 standard definition, fieldbus is a bidirectional digital communication protocol for interconnecting field automation devices and their control systems. That is to say, fieldbus is the underlying communication network in the control system with bidirectional digital transmission function. In the control system, it allows intelligent field devices to be fully digital, multi-variable, bidirectional, and multi-node, and exchange information with each other through a physical medium. In recent years, with the rapid development of industrial automation, the motion control system of machine equipment has the following technical requirements: (1) Multi-axis motion control. Due to the increase in the degree of automation, the number of axes required on a single machine has increased. It is common for a machine to have more than a dozen axes. With the increase in the number of axes, how to coordinate the movements of each axis is an important issue. (2) Small size. Due to the limitation of factory space, the size of the machine should be as small as possible. The size of the controller inside the machine is also required to be smaller and smaller, and the wiring space is also smaller and smaller. (3) More precise. As semiconductor manufacturing processes have become more precise to below 100nm, the motion precision required in the process and testing related equipment must also be more precise. Other equipment such as LCD equipment and SMD process equipment also have the same requirements. (4) More stable. Because of the substantial investment in all equipment, the cost of system downtime becomes even more prominent. Therefore, all machine equipment manufacturers must pursue system stability. They must also consider the ability to quickly replace damaged components without errors. Based on the above requirements analysis, it's clear that the need for multi-axis motion control within a single controller, coupled with a smaller controller size and easier wiring and maintenance, seems contradictory. However, fieldbus technology can solve these problems. 2. SJA1000 Main Features and Structure The SJA1000 is an independent CAN bus controller applicable to general industrial environments. Through simple bus connections, it can perform message control, data filtering, and other functions at the physical and data link layers of the CAN bus. Its hardware and software design is compatible not only with the PCA82C200's basic CAN mode (BasicCAN) but also supports the enhanced CAN mode (PeliCAN). The main features of SJA1000 are as follows: (1) The pins and electrical characteristics are fully compatible with the independent CAN bus controller PCA82C200, enabling the chip to be applied to existing PCA82C200-based applications to achieve performance upgrades; (2) The software is compatible with PCA82C200 (default is basic CAN mode); (3) The extended receive buffer (64-byte FIFO) can store up to 21 messages, which extends the maximum interrupt service time and avoids data overload; (4) When supporting CAN2.0B, it supports both 11-bit and 29-bit identifiers, allowing the application of these two frame structures in the same system; (5) It uses a 24MHz clock frequency and a bit communication rate of 1Mbits/s; (6) It provides an enhanced CAN mode (PeliCAN); (7) It supports multiple microprocessor interfaces and can support different types of processors in the Intel and Motorola systems; (8) It provides programmable CAN output driver configuration; (9) The operating temperature range is -40 to +125℃. Figure 1 shows the internal structure block diagram of the SJA1000. The SJA1000's internal structure mainly consists of the Interface Management Logic (IML), message buffers (including the transmit buffer TXB and the receive buffer RXFIFO), a bit stream processor (BSP), a receive filter (ASP), bit timing processing logic (BTL), error management logic (EML), an internal oscillator, and a reset circuit. The IML receives commands from the CPU, controls the addressing of the CAN register, and provides interrupt and status information to the master controller. The CPU's control writes the data to be transmitted into the TXB via the IML. The data in the TXB is processed by the BSP and then output to the CAN BUS via the BTL. The BTL constantly monitors the CAN BUS. When a valid header transition from "recessive level" to "control level" is detected, the receiving process is initiated. The received information is first processed by the bit stream processor (BSP) and then filtered by the ASP. Only when the identifier of the received information matches the ASP check is the received information finally written into the RXB or RXFIFO. The RXFIFO can buffer up to 64 bytes of data, which can be read by the CPU. EML is responsible for error control of the modulator in the transmission layer. It receives error reports from BSP and prompts BSP and IML to perform error statistics. 3. CAN Bus Multi-axis Motion Control System CAN bus (Controller Area Network) is a serial communication local area network that effectively supports distributed control or real-time control. Due to its high performance, high reliability, good real-time performance, and unique design, it has been widely used for data communication between various detection and actuators in control systems, and has become increasingly popular in the industrial control field. AC servo motors have excellent characteristics such as compact structure, easy control, stable operation, and fast response, and have been widely used in important industries such as CNC machine tools. Data transmission and control via CAN bus makes the performance of servo motors more stable and can be applied to motion control systems better and more flexibly. Figure 2 CAN bus servo motion control system As shown in Figure 2, the motion control system based on CAN bus has two significant characteristics compared with the typical structure of the control system. First, its controlled object is a servo motion control object; second, its networked controller includes two parts: the CAN bus communication medium and the CAN controller node. Multiple CAN controller nodes are interconnected in parallel via the CAN bus communication medium to form a single-layer CAN bus-based servo motion control system. When more axes of motion control are needed, simply add new motion control nodes and connect them as new CAN bus nodes to form a distributed multi-axis motion control system without requiring any hardware modifications to the original motion control nodes. It can also be interconnected with Industry Ethernet (IE) or Intranet/Internet via an Internet gateway to form a multi-layer networked servo motion control system. The design of a CAN bus-based motion control system mainly focuses on the design of the CAN controller nodes, including both hardware and software. Hardware design mainly involves selecting appropriate chips and hardware circuits to design the five basic components of the CAN controller node shown in Figure 2: the main controller, the interface module between the main controller and the sensor/actuator, the interface module between the main controller and the CAN bus controller, the CAN bus controller, and the CAN bus transceiver. Software design mainly involves selecting appropriate system software and application development software to design various interface driver software, system management software, and control function software. 4 System Hardware Design The main controller uses the AT89C51 microcontroller as the processing core and the PCA82C250 as the CAN bus transceiver. Figure 3 shows the circuit diagram of the CAN bus system based on the SJA1000. To enhance anti-interference capability, the TX0 and RX0 pins of the SJA1000 are not directly connected to the TXD and RXD pins of the PCA82C250, but are connected to the PCA82C250 through a high-speed optocoupler 6N137. This achieves electrical isolation between the CAN nodes on the bus. The two sides of the optocoupler 6N137 use two completely independent power supplies, VCC and +5V. The interface between the SJA1000 and the microcontroller is relatively simple. AD0~AD7 are directly connected to the P0 port of the AT89C51, and the RD, WR, and ALE signals are also directly connected to the corresponding pins of the AT89C51. MODE is connected to +5V to set the SJA1000 controller to Inter1 mode. The SJA1000's chip select signal CS is determined by the AT89C51's P2.0 pin. Therefore, the SJA1000's address space in the system starts from address 0. This address, plus an offset from the SJA1000's internal register address, can be used to access the SJA1000's internal RAM space. The SJA1000's interrupt output signal INT is connected to the AT89C51's INT0 pin, allowing the AT89C51 to respond to message transmission and reception in interrupt or polling mode. Figure 3 shows the schematic diagram of the CAN bus system based on the SJA1000. The circuit design employs isolation between power supply voltage and ground signals. Figure 3 shows two different power supply voltages, +5V and VDD. +5V powers the AT89C51, SJA1000 digital logic, and other digital logic devices, while VDD powers the other side of the bus transceiver PCA82C250 and 6N137. Correspondingly, the interface module uses two different ground signals. 5. Conclusion This paper analyzes the shortcomings of traditional motion control systems and proposes a motion control system scheme based on the SJA1000 CAN bus, making a valuable new exploration for the networked research and application of AC servos. The CAN bus can well meet the high requirements of fieldbus motion control systems for real-time response, and the use of the CAN bus also gives the system excellent scalability. This lays a solid foundation for the development of multi-axis or multi-point distributed motion control networks.