I. NMT

NMT (Network Management) is responsible for device state switching, online management, and heartbeat monitoring.

1. Slave State Switching Commands

The NMT master station controls the slave's operating status through specific commands, transmitted in the form of function code + node ID:

01 + Node-ID: START → Slave enters running state;

02 + Node-ID: STOP → Slave pauses operation;

80 + Node-ID: PRE-OPERATIONAL → Slave enters configuration state;

81 + Node-ID: Reset Application Layer → Resets slave application parameters (communication parameters are retained);

82 + Node-ID: Reset Node Communication → Resets slave communication parameters;

2. Node Online and Heartbeat Messages

Node Online: After startup, the slave actively sends a 700h + Node-ID message (data segment is 1 byte 00) to inform the master station that it is "ready".

Heartbeat Messages: Slave devices periodically send 700h + Node-ID messages, using a 1-byte data segment to identify the current status:

04: Stopped Status

05: Running Status

7F: Pre-operation Status
The master station broadcasts its online status via a 73F message (without a node ID).

II. SDO

SDOs (Service Data Objects) are used for non-real-time parameter reading and writing (such as object dictionary configuration), employing a "request-response" model with a fixed message format.

1. SDO Message ID Rules

Send (Master → Slave): 600h + Node-ID
Response (Slave → Master): 580h + Node-ID

2. SDO Read Message Format

Send Message (Master requests to read parameters)

COB_ID DLC Data[0] Data[1-2] Data[3] Data[4-7]

0x600+NodeID 8 command word (fixed 0x40) Object index (high byte + low byte) Object sub-index Padding 0x00

Response Message (Slave returns data)

COB_ID DLC Data[0] Data[1-2] Data[3] Data[4-7]

0x580+NodeID 8 command word (varies with data length) Object index Object sub-index Returned data (maximum 4 bytes)

Response command word rules:

1 byte data: 0x4F;

2 bytes data: 0x4B;

3 Byte data: 0x47;

4 bytes data: 0x43;

Read failure: 0x80;

III. PDO

PDO (Process Data Object) is the real-time data transmission carrier of CANopen, divided into transmit PDO (TPDO, slave → master) and receive PDO (RPDO, master → slave), supporting up to 4 PDO channels.

1. PDO Message ID Rules

PDO Types: TPDO (Slave Sending) RPDO (Master Sending)

PDO1: 180h+NodeID 200h+NodeID

PDO2: 280h+NodeID 300h+NodeID

PDO3: 380h+NodeID 400h+NodeID

PDO4: 480h+NodeID 500h+NodeID

2. PDO Transmission Trigger Conditions

The timing of PDO transmission is determined by the transmission type. Core trigger conditions include synchronization (SYNC), remote frame (RTR), and events (such as data changes):

IV. Object Dictionary (OD)

Object Dictionary (OD): All configurable parameters and communication objects are identified by a 16-bit index + 8-bit sub-index, divided into 4 main areas:

1000h-1FFFh: Communication object sub-protocol area (stores PDO, SDO, NMT) (e.g., communication configuration);

2000h-5FFFh: Manufacturer-specific sub-protocol area (manufacturer-defined parameters (flexible expansion);

6000h-9FFFh: Standardized equipment sub-protocol area (e.g., motor control parameters);

V. Special Messages

In addition to core messages, CANopen also has 3 types of special function messages:

Emergency message: 080h+NodeID, actively sent when the slave fails (e.g., motor overload), highest priority;

Synchronization message: Fixed ID080, periodically sent by the master station for multi-device synchronization (e.g., multi-axis motion control);

Time stamp message: Fixed ID100, the master station broadcasts the current time to achieve network clock synchronization;

VI. Logic Summary

CANopen's communication process can be simplified as follows:

Equipment online: Slave sends 700+NodeID (00), master station confirms;

Status configuration: Master station sends NMT command (e.g., 80+NodeID), slave enters pre-operation state;

Parameter configuration: Master station through... SDO (600+NodeID) reads and writes the slave object dictionary, configures PDO mapping, transmission cycle, etc.;
Startup: The master station sends 01+NodeID, and the slave enters the running state;
Real-time communication: The master station sends SYNC (080) to trigger PDO, the slave transmits data through TPDO, and the master station sends control commands through RPDO;
Fault monitoring: When the slave fails, it sends an emergency message (080+NodeID), and the master station monitors the device status through heartbeat messages;