Internationalof Computational
Intelligence
Systems
Journal ofJournal
Robotics,Networking andArtificial Life
Vol. XX(Z);Month(Year),xx–yy5(4); March(2019),
pp.pp.
236–240
DOI: 10.1080/XXXXXXXXXXXXXX;ISSN
ISSN2405-9021
XXXX–XXXXDOI: https://doi.org/10.2991/jrnal.k.190220.006;
print; online
2352-6386 online
https://www.atlantis-press.com/journals/ijndc
https://www.atlantis-press.com/journals/jrnal

Research Article

Multi-Motor Synchronous Control with CANopen
Chung-Wen Hung1,*, Roger CL Lee2, Bo-Kai Huang1, Shih-Ting Yu1
Department of Electrical Engineering, National Yunlin University of Science and Technology, Douliu, Yunlin 640, Taiwan, ROC
R & D Department, Naroller Electronics Co., Ltd., Guishan Dist., Taoyuan City 333, Taiwan, ROC

12ARTICLE INFO
Article History
Received 3 September 2018
Accepted 16 October 2018
Keywords
CAN bus
CANopenbrushless DC motors

ABSTRACTA Brushless DC (BLDC) motors synchronous control system based on the CANopen (a communication protocol and device
profile specification for automatic embedded systems) protocol is proposed in this paper. Multi-motor control is popular in robot
or automation system, and the synchronization is an important issue, may be the key issue. The CANopen is a solution, due toProcess Data Object (PDO) protocol. A Texas Instruments microcontroller TMS320F28069 is used as master to control six
BLDC motors used as slave in this paper. The Master sends synchronization object to slaves’ base on the communication profile
CAN (Controller Area Network) in Automation (CiA) 301 and the motion control profile CiA402. The system suns at 500 kbits/sand 1 Mbits/s transmission rate by setting PDO. The firmware details in this paper to show six-motor synchronous control.
© 2019 The Authors. Published by Atlantis Press SARL.
This is an open access article distributed under the CC BY-NC 4.0 license (http://creativecommons.org/licenses/by-nc/4.0/).

1. INTRODUCTION

2. SYSTEM ARCHITECTURE

Multi-motor synchronized control is an important and key issue
in robot or automation system. How a communication protocol
supports synchronization is discussed in many literatures [1].
As mentioned CAN communication for complex in-vehicle networks can reduce the cost of hardware configuration and maintenance [2] is similar to [1], but the CANopen protocol is adopted
and supports compatibility. The master communicate with thedevices from different manufacturers. CAN is also widely usedin the industrial field due to the better error mechanism andhigh transmission rate [3]. The CANopen protocol also defines
device specifications for industrial devices. This paper will referto the Network Management (NMT) object, which CANopen
basic communication specification is mentioned in Fan et al.
[4] and Huang [5]. The service data object (SDO) is used toask or set parameter for any single node. And the Process DataObject (PDO) is the object communication code for instantcommunication and the SYNC synchronization command. Thetarget of the paper is the synchronous control of six Brushless
DC (BLDC) motors, through the basic communication specification CiA 301 [6] and the motion device specification CiA 402[7]. The CAN peripheral of TI TMS320F28069, master, is used
to handle the CAN communication, and the CANOpen protocol is performed by program. The parameters of target speed,
acceleration and deceleration on the Maxon EPOS4 motor drive
could be set and synchronous controlled. The speed mode ofthe CiA 402 is used to achieve position control of the motor.
The updating rate for six motors synchronous control will be
discussed in this paper.

The system architecture is shown in Figure 1. The system includes amater (TI’s TMS320F28069), CAN driver (Renesas’ R2A25416SP)
and motor drivers (Maxon’s EPOS4) with motors.

Corresponding author. Email: wenhung@yuntech.edu.tw*

2.1. Master - TI TMS320F28069
The build-in peripherals of TMS320F28069, CAN module andtimer, are used in the CAN master. Due to digital format of CAN
module signal, a driver is necessary to convert signal to differential signals of CAN-H and CAN-L. These two wires are connected
directly to CAN bus. The timer is sued to trigger CPU to set thenew target speed, acceleration and deceleration values of the slaves
every fixed time interval.

2.2. Slave - Maxon EPOS4 Drive
The Maxon EPOS4 is adopted in system to drive motor, the CAN
communication interface is built in, and the CiA 301 and 402 object
specifications are supported by this driver. In this paper, it is selected
as the slaves to receive the target speed, acceleration or decelerationfrom the master for motor control.

2.3. CAN Transport Packets
The CAN2.0A format is shown in Figure 2, what is used inCANopen protocol. This format is also used in this paper, it is
the key of calculate communication capability, later. However, theformat includes stuffing bit, and this bit stuffing mechanism is used

C-W. Hung et al. / Journal of Robotics, Networking and Artificial Life 5(4) 236–240

237

use SDO, the node working state have be set into the pre-operationmode. If PDO, the node in operation mode is necessary.
In the master, the timer is used to trigger master to update theparameters of the PDO mapping to the device periodically. Theseparameters are the motion device state machine control object,such as the target speed object, the acceleration object, and thedeceleration object. The data type of each object is also shown inTable 2.

3.1. Implementation Process Data Object
In this paper, PDO is used for parameter setting and synchronouscontrol. The NMT object communication code is used to set theworking state of the node, and the NMT object includes the single orbroadcast mode. Due to multiple nodes in the proposed system, theworking state of all nodes is set to the operation mode in the broadcast mode. When the working state of node is the pre-operationmode, the node could process the SDO object. It is necessary for
the PDO usage, the PDO mapping function of the node must be
set by SDO in advance. The SDO is only use in a point-to-point
scheme. A node has to respond the SDO send from the master in
1 ms, as shown in Figure 3a.

Figure 1 | System architecture diagram.

After completing the PDO setting, the working mode of a nodeneeds to be set to the working mode, and then the PDO function
is valid. Note, it is important, when the nodes receive the PDO
from the master, the nodes will wait for the SYNC command fromthe master to start to achieve the command. Here, this SYNC is abroadcast signal without data, and all of the motors can start simultaneously, as shown in Figure 3b.

3.2. Compare SDO with PDO for
Synchronized Control
Figure 2 | Base of CAN data frame format.

to detect short even. The maximum of stuffing bits generated bythe bit stuffing mechanism is discussed in Zeltwanger [8], as shownin Equation (1). The first 4 bits of the 11 bits identifier (ID) of thearbitration field in a single complete packet are defined as the control code, and the else 7 bits specified in the following are the node
ID. These 11 bits are collectively referred to as the communication
object identifier, and is followed by corresponding format specifications for the data sections in the packet.

stuff bit max = 8 + 2*DLC(1)Figure 4 shows the comparison of SDO and PDO for synchronized
control with three parameters, which lengths are 1, 2 and 4 bytes.
Because the SDO has a specific format in the data field when setting the object parameter to a node. Three packets are necessary,
due to setting three object parameters in SDO mode. After setting,the node will return 4 bytes of response to the master. However,Table 1 | States and communication objects [6]

NMTPDO
SDO
SYNC

Pre-operational

Operational

Stopped√

√
√
√
√

√

√
√

3. SOFTWARE ARCHITECTURE
In the CANopen CiA 301 protocol, a master must arrange communication relationships between a transmit- and a receive-PDO
with SDO. CANopen Application layer and communication profile[6] is stipulated that the NMT must be used to control the working
state of the device before using the SDO or PDO. Each device hasa working state machine. The master controls the working state ofthe node through the NMT. As shown in Table 1, if people like toTable 2 | Data format of the object [7]Object

Data type6040h: Control word
60FFh: Target velocity6083h: Acceleration
6084h: Profile deceleration

UNSIGNED 16 (2 Bytes)
INTEGER 32 (4 Bytes)
UNSIGNED 32 (4 Bytes)
UNSIGNED 32 (4 Bytes)

238C-W. Hung et al. / Journal of Robotics, Networking and Artificial Life 5(4) 236–240				(a) SDO			(b) PDO

Figure 3 | Sequence in time.

Figure 5 | Experiment system.

commands are the target speed, acceleration, deceleration and­control word, and these four parameters are arranged into twogroups of PDO, means two PDO mapping. When the all slaves(named consumer in PDO mode) received all PDO parametersfrom the master (named producer in PDO mode), and then themaster sends a broadcast SYNC signal to trigger all slaves.
Figure 4 | SDO vs PDO [5].

after PDO mapping function is performed in SDO mode, only
8 bytes of one packet is required to set object parameters.

4. EXPERIMENTAL RESULTS
Figure 5 presents the system diagram of the experiment. As mentioned above, the master, TI TMS320F28069, and CAN driver in
red dash box. The blue dash box shows the salve, and every slave
includes a Maxon drive and a BLDC motor. Obviously, the CAN
bus is used to link master and all slaves in parallel.

4.1. Method of Updating Speed Commands
The system minimize requirement is that every slave is updatedthe driver commands every 0.1 s for synchronized control. These

4.2. Node Capacity Calculation
To make sure how many slaves could be control synchronously
in the proposed system, the node capacity calculation is necessary. As discussed previously, CANopen follows the packet
format of CAN2.0A, which is present in Figure 1. The lengthof the minimum packet which never includes any data byte is47 bits, which includes the inter-frame space field already. The
length of a packet depends on the object. The packet’s length
without stuff bit can be calculated from Equation (2). Moreover,in the actual situation, the stuff bit must be considered, and its
length could get from Equation (3).
CAN data bits nostuff bit = 47 + 8*DLC(2)

CAN data bitsstuff bit = 55 + 10*DLC(3)In SDO mode, the maximum number of nodes controlled synchronously in 0.1 s is derived as Equation (4). Note, the 8 ms isthe extra inter-frame space requested by Maxon for 8 packets.

C-W. Hung et al. / Journal of Robotics, Networking and Artificial Life 5(4) 236–240

First, the SDO_Packet_Length equals to the length of 4 parameter SDO packets plus 4 response packets. Note, the parameter
SDO packet includes the minimums length (55 bits), 4 bytes(CS, index, and sub-index) and data bytes as shown in Table 2,and the exact bit number can get from Equation (3). Moreover,
the response packet is fixed to 4 bytes plus 55 bits. Finally, theSDO packet is equal to 900 bits. And node number can be getfrom Equation (4).
Node numberSDO =0.1 (s)SDO _ Packet _ Length+ 8 (ms)Baud rate(4)On the other hand, the PDO calculation is shown in Equation (5).
Here, the one SYNC packet (55 bits) is necessary for every nodein 0.1 s. Next, PDO_Packet_Length includes two PDO packets,and the data lengths of the first and second PDO pocket are 8and 6 bytes, respectively. In short, PDO_Packet_Length is equal
to 250 bits.
SYNC
Baud rate
Node numberPDO =PDO _ Packet _ Length
Baud rate
0.1 (s) -(5)The calculation results are present in Table 3 for the different
communication mode and different baud rates. However, themaximum number of nodes is 127 in CANopen, it means thatthe rate of command updation could be increased in this case.

4.3. Experimental Results of Position Control
The experimental results of position control shown in Figure 6aand 6b is the initial/finish status. This experiment run in the PDO
mode. From left to right, the first and third motors are controlled
in the same commands, and the second and fourth are in the other
Table 3 | Maximum number of nodes

500 kbits/s
1 Mbits/s

SDO

PDO

1011

199 (127 in CANopen)
399 (127 in CANopen)

Figure 6 | Position experiments.

239

same commands. They are synchronous stopped at the same twopositions. The results show the proposed CANopen synchronous
control is workable.

5. CONCLUSION
This paper proposes a multi-node synchronization control system.
The system includes the CiA 301 and the CiA 402 of the CANopen
protocol and use the PDO and SYNC object for synchronization
control. The protocol is detailed and the capacity is calculated inthe paper. Finally, the experimental results shown the proposedsystem work well.

ACKNOWLEDGMENTS
This work is partially supported by the Naroller (Taiwan) Ltd. andalso by the Ministry of Science and Technology, Taiwan, ROC, undercontract No. MOST 107-2221-E-224-054 and 106-2218-E-150-001.

REFERENCES[1] D.Q. Wang, S. Gao, Y.Q. Chen, Y. Wang, Q. Liu, Intelligent control system based on CAN-bus for car doors and windows, 2009
3rd International Conference on Anti-counterfeiting, Security,and Identification in Communication, IEEE, Hong Kong, China,
2009, pp. 242–245.
[2] G. Livint, V. Horga, M. Ratoi, M. Albu, G. Chiriac, Implementing
the CANopen protocol for the distributed control of a hybridelectric vehicle, 2009 8th International Symposium on Advanced
Electromechanical Motion Systems & Electric Drives Joint
Symposium, IEEE, Lille, France, 2009, pp. 1–6.
[3] W. Li, G. Lijin, L. Zheyuan, Design of STM32-based CANopen
motion control master in transfer robot, 2013 Third International
Conference on Instrumentation, Measurement, Computer, Com­
munication and Control, IEEE, Shenyang, China, 2013, pp. 1609–1612.
[4] Y. Fan, R. Chen, Z. Chen, Communication of the wind turbine
testing system based on CANopen protocol, 2011 IEEE PowerEngineering and Automation Conference, IEEE, Wuhan, China,
2011, pp. 162–165.
[5] B.K. Huang, Design and implementation of micro-stepping
motor driver with CANopen, Master Thesis, National Yunlin
University of Science and Technology, Taiwan, 2017.
[6] CANopen application layer and communication profile, CiA
DS301, Version 4.0.2, 2002, pp. 15–114.
[7] CANopen device profile drives and motion control, CiA DS402,
Version 2.0, 2002, pp. 14–174.
[8] H. Zeltwanger, CANopen: das standardisierte, eingebettete
Netzwerk (Chinese Edition), Beijing University of Aeronautics
and Astronautics Press, VDE-Verlag, 2008, pp. 1–123.

C-W. Hung et al. / Journal of Robotics, Networking and Artificial Life 5(4) 236–240

240Authors Introduction
Asst. Prof. Chung-Wen Hung

Mr. Shih-Ting Yu

Dr. Hung got his PhD fromNationalTaiwan
University,Taiwan, ROC. Currently, he is anAsst. Prof. in the Department ofElectrical Engineering, NationalYunlin University of Science andTechnology. His research interest
focus on IoT, IIoT, MCU applicationand motor control.

Mr. Roger CL Lee

He received the B.S. degree in electrical engineering from National
Chin-Yi University of Technology,
Taichung, Taiwan in 2017. He iscurrently doing Master of ElectricalEngineering at National Yunlin
University of Science and Tech­
nology, Yunlin, Taiwan, ROC. His
research interest is motor control.

Mr. Bo-Kai Huang
Roger Cheng-Lung Lee received
the B.S. and M.S. degree from theUniversity of Southern California, Los
Angeles, CA, USA, in 1999 and 2000,
respectively, both in electrical engineering. He is currently working toward
the PhD degree in the Department ofMechanical Engineering at the National
Taiwan University, Taipei, Taiwan. His
research interests focus on high speed
motors and the relevant drivers.

He received the B.S. and M.S. degrees
in electrical engineering fromNational Yunlin University of Scienceand Technology, Yunlin, Taiwan,
ROC. Since 2017, he has been a R&D
engineer in the Chroma Electronics
Co., Ltd., R.O.C., and his researchinterest is motor control.