Abstract: CAN bus-based motion control systems are widely used in military and civilian industrial fields. This paper introduces an AC servo motion control system implemented using the Israeli Elmo servo system and its CAN bus technology, detailing the design of each part of the control system and its internal modules. 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. Keywords: Elmo Servo, CAN bus, modular design [b][align=center]Elmo Servo Motion Control System Based on CAN bus Yu Gang, Shu Zhibing[/align][/b] Abstract: Motion control systems based on CAN bus are widely used in civil and military industries. This paper introduces the Elmo Servo motion control system made in Israel based on CAN bus. Each part of the system and its modules are introduced in detail. The hardware and software of the system are analyzed and compared with commonly used CAN motion control systems. Its characteristics and advantages are expressed through the comparison. Keywords: Elmo Servo, CAN bus, modularization designing 1 Introduction CAN fieldbus is a fieldbus designed by Bosch in Germany for bus systems in the late 1980s. It is the only fieldbus to date to become an international standard and is recognized as one of the most promising fieldbuses globally. CAN fieldbus was initially used in automotive monitoring systems. Due to the characteristics of the CAN bus system, it has since been widely used in process industries, machinery industries, textile industries, agricultural machinery, robots, CNC machine tools, medical devices, and sensors. In 1999, 60 million CAN bus controllers were put into use, and in 2000, the market sales exceeded 100 million fieldbus devices [1]. This paper introduces an Elmo servo motion control system based on CAN bus and Ethernet designed by the Institute of Motion Control of Nanjing University of Technology and its design. The product is provided by Elmo of Israel and includes the following technologies: analog power conversion, ASIC, DSP and processor-digital driver based on current loop control, bus structure-digital driver, and the third-generation motion control programming language Elmo Studio. The hardware adopts the MASETRO of ELMO of Israel, the MC206 multi-axis controller of TRIO of the UK, and the PWS6600C-S and BAS-3/230 series AC servo drivers of Quanyi Company [2]. Now ELMO has a wide range of applications: semiconductors, medical, electronic products, packaging machinery, linear motors, material handling, wood cutting, robots, military and aviation, and laboratory automation. Here, the Elmo servo motion control system is mainly used as an AC servo experimental platform based on CAN bus in the bus motion control experiment and servo characteristic experiment of Nanjing University of Technology. 2 Standard CAN bus control system design CAN is a serial communication bus, adopting CAN2.0A or 2.0B communication standards, broadcast communication mode, multi-master structure, lossless arbitration, and has a complete error detection mechanism and automatic retransmission mechanism. CAN has the characteristics of advanced technology, high reliability and reasonable cost, but the CAN protocol itself is not complete. It defines the data link layer and part of the physical layer, and provides a broadcast message frame transmission channel for CAN nodes in the network. Its flow control, node address allocation, communication establishment and other specific contents need to be implemented by the user, so an application layer protocol needs to be established. The main standards of the application layer protocol of the CAN bus distributed motion control system currently popular abroad are: CANopen protocol, DeviceNet and SDS. The main domestic standards are iCAN, etc., which have been implemented in China with 4 million nodes [3]. According to the CAN bus protocol, the CAN bus can be any topology, but in general, the CAN bus mainly adopts the four topologies shown in Figure 1. [align=center] Figure 1 Four topologies of CAN bus[/align] The motion control system based on CAN bus is shown in Figure 2. It has two significant features. First, its controlled object is a servo motion control object. Second, its networked controller includes two parts: CAN bus communication medium and CAN controller node. [align=center] Figure 2 Structure of servo motion control system based on CAN bus[/align] The hardware uses PHILIPS SJA1000 independent CAN controller and PCA82C250 general CAN transceiver. In order to ensure the quality of bus transmission and improve anti-interference ability, two high-speed optocouplers can be added between SJA1000 and PCA82C250. Generally, 6N137[4] is used. The SJA1000 controller supports CAN2.0B underlying communication protocol, CANopen or Device Net application layer communication protocols. The simplest hardware circuit is shown in Figure 3. After formulating a simple communication protocol, a simple CAN bus control system can be formed. This type of system is inexpensive and economical, suitable for systems with general requirements for stability, reliability, and working environment, such as smart communication cards, automotive control systems, elevator control systems, temperature and humidity data acquisition and alarm systems, and factory monitoring systems. [align=center] Figure 3: The simplest CAN bus hardware circuit[/align] 3 ELMO Motion Control System Based on CAN Bus 3.1 ELMO System Hardware Composition The system is based on the CAN 2.0B communication protocol, and the application layer uses the CANopen protocol commonly used in distributed motion control systems. This protocol specifies the communication mode, network management, and related parameter settings in detail. The system design uses a daisy-chain topology. This topology connects one device to the next with cables, until the last device and the terminator. As shown in Figure 4. [align=center] Figure 4: Daisy-chain topology[/align] Here, the terminator is integrated in the last driver. This structure can also be considered a bus topology with zero length. If a daisy-chain topology is used, when a device is removed from the area, all devices in the area following that device will lose connection, resulting in a fault. This will lead to the potential shutdown of many equipment failures. This system adopts this topology: (1) The maximum communication distance of the CAN bus is 10km. When used for factory control or monitoring, this structure can reduce the total cable length and reduce the use of cables, thereby reducing equipment connection costs. (2) In summary, this structure requires each device to have high stability and reliability. The Elmo servo motion control system is such a system. It uses patented chip design to ensure high stability. Low electromagnetic radiation: high shock resistance 12G, operating temperature range: 40-80℃, strong gravity up to 25+G, operating humidity 90%, mean time between failures 500,000 hours. In the architecture of the whole system, the motion controller adopts the independent motion controller Maestro from Israel ELMO, and the driver adopts the Elmo dedicated servo driver Bassoon. [align=center] Figure 5 Elmo Distributed Servo System Architecture[/align] The motion controller Maestro is mainly composed of five modules [5], as shown in Figure 6. (1) Blue indicates the host communication module: Host Communications Services, which is responsible for communication between Maestro and the outside. (2) Black represents the command line interpreter module, which is responsible for executing personal commands immediately through Maestro or SimplIQ. (3) Brownish-yellow represents the kernel module, Virtual Machine, which is responsible for executing user command programs. (4) Light yellow represents the control management module, Motion Manager, which sends and receives information from each axis and coordinates the movement of each axis. (5) Green represents the CAN bus module, CAN Network Communications Server, which integrates modules that support CAN bus communication and modules that support the CANOpen protocol. It is responsible for communicating with the CAN bus and supports CANopen DS301, DSP401, and DSP402 communication protocols. [align=center] Figure 6 Maestro Motion Controller Structure[/align] Each module performs its own function and communicates with each other to exchange information between the system and the outside world to complete the user's commands. Each major module has sub-modules, such as: the host communication module is divided into RS-232 communication module, local Ethernet module, remote control Telnet module, wide area network WEB module, protocol conversion gateway module, etc. Compared with the general CAN bus control system mentioned above, which uses the independent bus controller SJA1000 internal CAN2.0B protocol module and application layer module to complete the upper computer communication function, it adopts a completely modular design and has many advantages: the product is updated quickly, which can shorten the design and manufacturing cycle, reduce costs, make maintenance convenient, and ensure product performance is reliable. The reuse of functional modules can reduce development costs, improve system quality and safety performance, and ensure that the controller can meet the requirements [6]. It has protocol modules such as CANopenDS301, so there is no need to define the application layer protocol. The remote control module is used for remote control, the Ethernet module is used for local area network PC control, and the gateway module is used for protocol conversion, which are all unmatched by it. In addition, the ultra-small size, ultra-high stability, powerful internal integrated functional amplifier drive function, and ultra-short response time of only 200 microseconds are many advantages that Elmo products have. Compared with general servo drives, Elmo servo drive Bassoon adopts an intelligent modular design, the core is Motorola 16-bit DSP motor control dedicated chip, and provides corresponding development tools for controlling permanent magnet synchronous motors, asynchronous motors, etc. Internally, it includes a CAN bus module supporting the CAN2.0B communication protocol. This DSP supports interpolation functions such as PVT. It can be controlled via Maestro or directly via a PC. It features ultra-short response time, typically in the microsecond range, and ultra-small size. Intermediate code generated by the host computer is transmitted to the Maestro controller. Maestro continuously translates the updated position commands (motion curves) from the host computer and transmits them to the driver via the fieldbus. The bus nodes interpret the instructions and convert them into digital pulse signals to control the AC servo motor to complete the commands. 3.2 ELMO Motion Control System Software Composition Elmo provides dedicated software, Elmo Composer, for initialization parameter setting and modification. The motion control language ELMO, a VC-like language, ELMO Studio, is used for programming the relevant running trajectories. Elmo Recorder is used for monitoring and recording the running trajectories. The ELMO Studio motion control language uses a high-level language, with concise, easy-to-understand, and easy-to-remember instructions, simple programming, and basic PLC and motion control functions. The implementation of PLC and motion control functions uses a unified programming language, simplifying program writing. The ELMO Studio language uses a host computer compiler to analyze the source program lexically, syntactically, and semantically. The compiler then generates intermediate code, which is downloaded to the embedded motion controller (lower-level device) for interpretation. The lower-level interpreter uses a loop structure to read and interpret the motion control program downloaded to the motion controller's user program area, thereby achieving motion control and PLC control. It features multi-axis synchronous control, enabling coordinated movement of 1-48 axes to complete the required path. This control language is a high-level compiled language unique to Elmo. Typical CAN bus control systems do not possess multi-axis synchronous control capabilities. The purpose of the software design is to develop a 32-bit application for use in the Windows environment using VC++ 6.0. At the upper layer of the software, an interactive human-computer interface is implemented using interface functions provided by ELMO and the MFC library provided by Microsoft. The overall interface style is MDI (Multi-Dimensional Interface), consisting of a main window containing child windows. Within this MDI structure, *Frame, *View, and *Document are integrated, and their control relationships are shown in Figure 7: [align=center] Figure 7 Class Hierarchy and Interrelationship Diagram[/align] In Figure 7, CMacApiTestApp is a derived class of CWinApp, and CMainFrame is a derived class of CMDIFrameWnd. CMacApiTestApp manages the entire program and controls the entire process. CMainFrame is most importantly a message handling class; it is the parent window of other child windows, and all control messages must pass through it. For example, it responds to all menu messages, dialog box messages, timer messages, control messages, custom messages, and underlying *.DLL interactive messages, and sends motion control commands. 4. Conclusion This paper compares a general CAN bus motion control system with the Elmo servo motion control system, highlighting the characteristics of the Elmo control system. The comparison reveals that the Elmo servo control system possesses many structural and design features not found in general CAN bus control systems, making it a motion control system with extremely high stability and precision. In fact, it is widely used in aerospace and military industries, where extremely high stability is required. The clever modular design of the Elmo servo system, if applied to other motion control systems, would undoubtedly result in high production efficiency and significantly improve system stability. References [1] Wu Kuanming. CAN bus principle and application system design [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 1996.6 [2] Yan Caizhong, Shu Zhibing. Research on distributed servo control system based on touch screen [J]. Modular machine tool and automated processing technology. 2007 (4): 48-51 [3] Shi Jiugen. CAN fieldbus system design technology [M]. Beijing: National Defense Industry Press, 2004.10 [4] Research on the architecture of hybrid electric vehicle control system based on CAN [J]. Transactions of the Chinese Society for Agricultural Machinery. 2004, 35 (6): 9-11 [5] Maestro Software Manual [S]. Elmo company [6] Shu Zhibing, et al. AC servo motion control system [M]. Beijing: Tsinghua University Press, 2006.3.