CANopen-Industrial-Motor-Control---What-CANopen-Does

Industrial devices need a communication bus to “talk” to one another. Before the CAN bus appeared, traditional serial communications such as RS-232 supported only point-to-point communication and could not enable multiple controllers to exchange data simultaneously in real time. CAN, or Controller Area Network, was designed from the beginning for real-time communication among multiple devices. It provides strong noise immunity and reliable data transmission, while allowing multiple nodes to send and receive short messages. The automotive industry was the first to adopt CAN on a large scale: a vehicle may contain dozens of sensors and controllers that must continuously exchange data, and CAN is well suited to this task.

Why CANopen When CAN Already Exists?

CAN solves the problem of how to transmit data at the physical and data-link levels. However, devices from different manufacturers may use proprietary rules to interpret that data. Integrating equipment from multiple vendors into one system can therefore be difficult, or even impossible.

To solve this problem, CAN in Automation (CiA) worked with equipment manufacturers to define a higher-level protocol on top of CAN. This protocol is CANopen. A useful analogy is that CAN provides the “roads and traffic rules,” while CANopen provides a common language.

What Problems Does CANopen Solve?

The role of CANopen can be summarized in three points. First, it defines common rules so devices from different manufacturers and with different functions—motor drives, I/O modules, sensors, and more—can recognize and communicate with one another in a multi-vendor network. Second, it is highly configurable: device parameters are stored in an object dictionary and can be read or written as required by the application. Third, it supports efficient and reliable real-time data exchange, with a slower but reliable configuration channel (SDO) and a fast, efficient real-time channel (PDO).

Key Functions of CANopen

  1. A common communication language: PLCs, motor drives, and sensors from different manufacturers can communicate on the same CAN bus.
  2. Designed for motion control: CANopen is well suited to stepper motors, BLDC motors, and multi-axis control.
  3. Two clearly defined communication mechanisms: SDOs handle parameter configuration, while PDOs handle high-speed real-time data.
  4. Standardized device-state management: NMT defines a consistent process for starting, idling, running, and stopping devices.
  5. Heartbeat monitoring: The network can automatically detect device dropouts and communication faults.

Typical applications include laboratory automation, robotics, semiconductor equipment, and conveyor systems.

Practical System Used in This Series

The following articles use a system consisting of the ADI (Analog Devices) Trinamic TMCM-6212 six-axis stepper motor drive/controller module, the QSH4218-35-10-027 stepper motor, and a Schneider TM251MESC PLC as an example. The series explains CANopen networking, configuration, communication, and bus-sniffing diagnostics step by step. The complete system architecture is shown in Figure 1.

Figure 1. System overview: the Schneider PLC (client) communicates with the TMCM-6212 (server) over the CAN bus to drive the stepper motor. (Image source: ADI)

Left: Schneider TM251MESC PLC (Client, CANopen Master)

The PLC is the “commander in chief” of the system and acts as the CANopen client (master):

  1. EDS files: Device description files for the drive. After they are imported into the PLC software, the PLC can identify the parameters and messages supported by the TMCM-6212.
  2. Baud rate and system configuration: Global network settings such as bus baud rate, node ID, and heartbeat.
  3. Parameter settings: Motor parameters configured and sent to the drive through SDOs.
  4. Software application layer: The motion program and logic in the PLC, which serve as the control brain of the system.

Center: CAN Bus (Communication Channel)

The bus is the communication path between the two sides. All commands and real-time data travel over it. The diagram identifies four core types of interaction:

  1. Control word, object 6040h: Commands sent from the PLC to the drive, such as enabling the motor, starting motion, and performing an emergency stop.
  2. Status word, object 6041h: Feedback from the drive to the PLC, reporting the motor’s current state and any alarms.
  3. RPDOs: Receive process data objects used by the PLC to send real-time motion commands, such as target position and target velocity, to the drive.
  4. TPDOs: Transmit process data objects used by the drive to report real-time status data, such as actual position and actual velocity, to the PLC.

Right: TMCM-6212 Server (CANopen Slave, Motor Drive)

The drive is the actuator. It receives commands from the PLC and directly drives the motor. It contains four major modules:

  1. NMT state machine: Controls whether the drive is in initialization, pre-operational, operational, or stopped mode, and determines which SDO and PDO services are available.
  2. Trajectory generation: After receiving target position and velocity, the drive automatically plans a smooth motion profile with controlled acceleration and deceleration.
  3. Feature configuration: Trinamic motor-control functions such as StealthChop, StallGuard, SpreadCycle, homing, and encoder feedback.
  4. Electrical parameter settings: Hardware parameters such as motor current, microstepping, and drive voltage.

Far Right: Motor

The drive provides the final power output, directly rotating the motor to complete the mechanical action.

Overall Workflow

The overall process can be summarized in one sentence: the PLC executes the motion logic and communicates over the CAN bus; during startup it sends motor parameters to the TMCM-6212 through SDOs, then uses RPDOs to send target position and control-word commands and TPDOs to read actual position and status during operation. The drive performs trajectory planning and motor-control calculations, rotates the motor, and continuously reports motor status back to the PLC.

Related products:

Additional References