Abstract: This paper introduces the characteristics of CAN bus and servo motors, and describes an AC servo motion control system implemented using servo and CAN bus technologies. The paper designs the various parts and internal modules of the entire control system. A comparison is made between this system and a general CAN bus control system from both hardware and software perspectives, highlighting the system's features and advantages. The communication control characteristics of servo motors based on CAN bus are also discussed.
0 Introduction
CAN fieldbus, designed by Bosch in Germany for bus systems in the late 1980s, is a serial communication local area network that effectively supports distributed 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 actuator mechanisms in control systems. It is the only fieldbus to date to have become an international standard and is recognized as one of the most promising fieldbuses globally. Due to the characteristics of the CAN bus system, it has since been widely used in process industries, machinery industries, textile industries, agricultural machinery, robotics, CNC machine tools, medical devices, and sensors. In 1999, 60 million CAN bus controllers were in use, and in 2000, the market sales of fieldbus devices exceeded 100 million. CAN bus has experienced a surge in application in the industrial control field.
Synchronous control of multiple motors is a crucial issue in the printing machinery industry. Due to the special process requirements of printing products, especially multi-color printing, high slip rates (generally ≤0.02%) are required for each motor to ensure printing registration accuracy (typically ≤0.05mm). Traditionally, printing machinery has largely employed synchronous control schemes using long mechanical shafts as power sources. However, these schemes are prone to oscillations and mutual interference between units, and the presence of numerous mechanical parts makes system maintenance and operation inconvenient. With the development of mechatronics technology, fieldbus technology has been widely applied in various fields. This paper proposes and validates a synchronous control solution based on CAN fieldbus for the synchronization requirements of unit-type printing machinery.
1. CAN bus control system design
CAN is a serial communication bus that uses the CAN2.0A or 2.0B communication standard. It features broadcast communication, a multi-master structure, lossless arbitration, a robust error detection mechanism, and an automatic retransmission mechanism.
CAN boasts advanced technology, high reliability, and reasonable cost; however, the CAN protocol itself is incomplete. It defines a data link layer and part of the physical layer, providing a broadcast-style message framing transmission channel for CAN nodes in the network. Specific details such as flow control, node address allocation, and communication establishment need to be implemented by the user, thus requiring the establishment of an application layer protocol. Currently, the main international standards for application layer protocols in CAN bus distributed motion control systems include CANopen, DeviceNet, and SDS. Domestically, the main standard is iCAN, which has already implemented 4 million nodes in China. According to the CAN bus protocol, the CAN bus can have any topology, but generally, CAN buses mainly adopt four topologies: bus, ring, star, and mesh.
Figure 1. Structure of a CAN bus-based servo motion control system
The motion control system based on the CAN bus is shown in Figure 1. It has two significant features: first, its controlled object is a servo motion control object; second, its networked controller consists of two parts: the CAN bus communication medium and the CAN controller node.
As a network specifically designed for industrial automation, the CAN bus has the following advantages:
(1) It is simple and convenient to use.
Many CAN controller chips, such as SJA1000T and Philips82C250, implement most of the CAN physical layer and data link layer. When using them, users only need to do two things: initialize the CAN controller and perform data transmission and reception operations on the CAN bus.
(2) High efficiency and reliability.
CAN uses a short frame structure, with a maximum data field length of 8 bytes per frame, resulting in high transmission speed (maximum communication rate up to 1 Mbps) and low probability of interference. Furthermore, as a multi-master bus, each node gains bus control through bus arbitration and possesses a robust error handling mechanism, ensuring secure and reliable data transmission under various interference environments.
(3) The system has good expandability.
The CAN bus uses message-oriented encoding rather than device-oriented encoding, making it very convenient and flexible to add or remove nodes on the CAN bus, and facilitating system expansion.
2. Synchronous Control System Design
Considering the complex synchronous motion relationships in printing presses, high registration accuracy, numerous and dispersed printing press points, multiple operation substations, and long printing production lines, a fully distributed, fully digital, and fully open fieldbus control system (FCS) is adopted, with the CAN bus selected as the bus.
To achieve the complex synchronization relationship between the various printing press units, the main controller and the servo drivers of each motor are connected to the CAN bus, forming a CAN fieldbus system with the printing press controller as the core. Figure 2 shows the synchronization control system diagram.
Both the controller and servo drives are equipped with communication adapter cards for the SJA1000 CAN bus controller and PCA82C250 transceiver. Through these CAN communication adapter cards connected to the printing press controller, the controller can easily and quickly communicate with each servo drive, sending control commands and position setpoint commands to each servo unit, and obtaining real-time status information for each servo motor. Servo parameters can be modified in real-time as needed, and each servo unit can also exchange data promptly via the CAN bus. Each servo drive closely follows its own position reference command after receiving it. Because the controller's position commands are directly input to each servo drive, each servo drive receives synchronized motion control commands, unaffected by other factors; that is, no single servo unit is affected by disturbances from other servo units. In this system, the controller and each servo drive act as network nodes, forming a CAN control network. Furthermore, due to the use of a fieldbus control system, the number of network nodes can be expanded according to the printing scale.
Figure 2 Synchronous Control System Diagram
3 servo motors connected to CAN network
Because the servo controller of the servo motor provides a dedicated CAN bus interface X4, it can be easily connected to a CAN bus-based industrial control system using ordinary twisted-pair cable as the communication medium, just like other CAN nodes. Feedback between the servo controller and the servo motor is established using a rotary transformer or photoelectric encoder, forming a high-precision servo control system. The servo motor uploads its operating status and information to the servo controller in real time. As a node on the CAN bus, the servo controller can not only communicate with the host computer, receiving various operation, control, and parameter setting commands from the host computer via the CAN bus, but also exchange data quickly with other servo controllers, establishing a certain coordination or control relationship between them.
The host computer gains CAN bus support by connecting a CAN-enabled communication adapter card and is responsible for monitoring and managing the operation and status of the entire system. Due to the increasingly widespread application of the CAN bus in industrial control, many companies have launched interface adapter cards supporting the CAN bus, such as Advantech's PCL-841 communication card, Beijing Huakong's HK-CAN20 communication card, and Beijing Sanxingda's intelligent CAN-PC bus adapter card PCCAN, etc. Users can use these interface adapter cards to run complex communication tasks and perform digital communication and coordination management between each CAN node and the host computer.
4 Servo Motor Selection
Taking a web-based printing press as an example, its load rotational inertia is very large. The flexographic printing unit has a rotational inertia of 0.13 kg·m2, while the offset printing unit has the largest rotational inertia of 0.33 kg·m2.
Because the system positioning accuracy requirement is ≤0.03mm, and considering the large inertia of the load, the control cycle is set to 2ms, requiring a steady-state error of ±1 pulse in the position loop. Based on the positioning accuracy and steady-state error, the encoder line count can be calculated to be 17,000 lines. However, considering that the positions of different units need to be constantly adjusted during the actual printing process, if the encoder resolution is selected to be 17,000 lines, a large angular acceleration will be generated when adjusting the printing roller due to the large rotational inertia of the unit, resulting in a large torque. For example, for offset printing units, the adjustment angular acceleration exceeds 700 rad/s², and the adjustment torque exceeds 200 N·m, which cannot be met by ordinary motors.
Taking all factors into consideration, an encoder resolution of 40,000 lines was selected. This reduces the motor's adjustment acceleration during the adjustment process, thereby reducing the adjustment torque. For example, in offset printing presses with the largest load inertia, the adjustment angular acceleration is 78.6 rad/s², and the adjustment torque is 26 N·m. The 90M series servo motor from Kage Electric Co., Ltd. can fully meet the requirements.
5CAN bus data synchronization mechanism
To enable CAN bus-based applications, the servo controller provides dedicated CAN bus function modules CAN-IN and CAN-OUT as process data channels for data transmission. CAN-IN1 and CAN-OUT1 are specifically used for communication and data transmission between the servo controller and the host computer. The CAN-IN1 input function module receives data from the host computer. CAN-IN1 has 8 bytes of data space available for user configuration, allowing it to provide various control signals, including binary signals, 16-bit analog signals, 16-bit speed signals, and 32-bit phase signals, to other internal function modules. The host computer can send commands to the CAN-IN1 module configured according to the actual application to achieve various functions such as servo motor speed setting, motor fast stop, motor forward/reverse switching, switching between normal mode speed and constant low speed, motor enable, and motor disable. Similarly, the CAN-OUT1 function module also has 8 bytes of data space available for user use and can be configured to provide the host computer with real-time information such as motor status, actual motor speed, and actual motor phase.
(1) Hardware clock synchronization. Hardware clock synchronization refers to the synchronization between local clocks using certain hardware facilities (such as GPS receivers, UTC receivers, dedicated clock signal lines, etc.). The object of operation is the computer's hardware clock. Hardware synchronization can achieve very high synchronization accuracy (usually 10⁻⁹ seconds to 10⁻⁶ seconds).
(2) Synchronization message timing. At the beginning of each communication cycle, the master station sends a synchronization message in broadcast form. For example, in the SERCOS protocol data transmission layer, the start of each SERCOS communication cycle is marked by the master station sending a synchronization message MST. The data field of the MST is very short, occupying only 1 byte. The synchronization accuracy of the MST message is very high; if optical fiber is used as the transmission medium, the synchronization accuracy can be within 4 microseconds.
(3) Protocol-based time synchronization. Protocol-based time synchronization, also known as software-based time synchronization, refers to using a network to transmit the master clock source to other subsystems to achieve time synchronization of the entire system. By calculating the time difference between sending the master clock information and the target node receiving the information and generating an interrupt, the delay time can be obtained. Then, delay compensation is used to achieve time synchronization. Software-based time synchronization is low in cost, but due to the large delay and significant uncertainty in the transmission of synchronization information over the network, the time synchronization accuracy is low (usually 10⁻⁶ to 10⁻³ seconds).
6. Software Design of the Host Computer
For servo motors that communicate and are controlled via CAN bus, after configuring the internal control signal flow of the servo controller, as well as the CAN-based interface function modules and data channels according to the actual application requirements, the remaining issue to be addressed is the software design of the host computer.
Since the CAN communication adapter card connected to the host computer generally provides CAN driver functions, the communication with the CAN bus can be implemented directly using these functions during the host computer software development process. For example, the main tasks of the host computer's communication with CAN—initializing the CAN adapter card, sending CAN packets, and receiving CAN packets—all have readily available functions, facilitating CAN communication for users. Initializing the CAN communication adapter card mainly involves initializing its various registers, setting necessary parameters such as interrupt vectors, baud rate, and interrupt mask words to prepare for normal communication. Sending CAN packets requires first determining the 11-bit information identifier of the packet, filling it into the frame header, and filling the data field with the data to be sent. The packet is then sent to all CAN nodes or a specific CAN node using the send function. For CAN packets received using the receive function, their source is determined by their 11-bit information identifier. The data in the data field is processed to obtain valid information for display or storage, and control commands are sent as needed.
7 Conclusions
Communication between the controller and servo motor is achieved using the CAN fieldbus. This not only overcomes the shortcomings of traditional mechanical long-axis control schemes due to various mechanical components, but also offers advantages such as good synchronization performance, no mutual interference between servo units, high control precision, and convenient maintenance. The introduction of the CAN interface for servo motors improves their automation level, making communication and control within industrial control networks more convenient, flexible, and reliable. The increasingly widespread application of the CAN bus in modern industrial control systems provides broad application prospects for servo motors with CAN interfaces.