CanOPEN PDO Example

The mode of operation is mapped at index 0x6060 subindex 0 with size of 1 byte. For example: Profile position is 1, Profile velocity is 3, Torque profile is 4, Interpolated position is 7.

The communication is with DS402 Profile on CiA 301 (CAN in Automation). Reference: https://en.wikipedia.org/wiki/CANopen

PDOs must be transmitted and received at every Sync, COB ID = 0x80. Master can access the parameter inside the slave using SDO read and write.
See here: https://www.nilab.at/dokuwiki/doku.php?id=mbd_servo_drive:registers|

How to program using SDO write - Position control - Interpolated position

Configuration of PDO from Slave to Master

COB ID	D0	D1	D2	D3	D4	D5	D6	D7	Comment
0x600+(nodeid)	0x23	0x00	0x1A	0x01	0x20	0x00	0x64	0x60	Position actual value
0x600+(nodeid)	0x23	0x00	0x1A	0x02	0x10	0x00	0x41	0x60	Status word
0x600+(nodeid)	0x23	0x00	0x1A	0x03	0x08	0x00	0x61	0x60	Mode of operation display

Configuration of PDO from Master to Slave

COB ID	D0	D1	D2	D3	D4	D5	D6	D7	Comment
0x600+(nodeid)	0x23	0x00	0x16	0x01	0x20	0x00	0xC1	0x60	Interpolated data record
0x600+(nodeid)	0x23	0x00	0x16	0x02	0x10	0x00	0x40	0x60	Control word
0x600+(nodeid)	0x23	0x00	0x16	0x03	0x08	0x00	0x60	0x60	Mode of operation

How to program using SDO write - Torque control

Configuration of PDO from Slave to Master

COB ID	D0	D1	D2	D3	D4	D5	D6	D7	Comment
0x600+(nodeid)	0x23	0x00	0x1A	0x01	0x10	0x00	0x77	0x60	Torque actual value
0x600+(nodeid)	0x23	0x00	0x1A	0x02	0x10	0x00	0x41	0x60	Status word
0x600+(nodeid)	0x23	0x00	0x1A	0x03	0x08	0x00	0x61	0x60	Mode of operation display

Configuration of PDO from Master to Slave

COB ID	D0	D1	D2	D3	D4	D5	D6	D7	Comment
0x600+(nodeid)	0x23	0x00	0x16	0x01	0x10	0x00	0x71	0x60	Target Torque
0x600+(nodeid)	0x23	0x00	0x16	0x02	0x10	0x00	0x40	0x60	Control word
0x600+(nodeid)	0x23	0x00	0x16	0x03	0x08	0x00	0x60	0x60	Mode of operation

Additional parameter are 0x6087 ⇒ Torque Slope and 0x6088 ⇒ Torque profile type (0 = Linear ramp)

STATUS WORD Register

BIT Number	Description	Mode of operation
11
12	Interpolated positioning
12	Profile velocity
13	Profile velocity
12	Homing
13	Homing
12	Profile positioning
13	Profile positioning

CONTROL WORD Register

BIT Number	Description	Mode of operation
1
2
3
4	Homing
4	Interpolated positiong
4	Profile positioning
5	Profile positioning
6	Profile positioning
7
8

DS402 State Machine

Enabling the drive

SERVO-ON: is procedure that Master should read Statusword from driver and send corresponded Controlword (command) to driver to make it change to final state, Operation Enable. The common SERVO-ON path in CiA 402 state machine is: (1) → (2) → (3) → (4) or (13) → (14) → (15) → (2) → (3) → (4)

Disabling the drive

SERVO-OFF: is procedure to switch off servo drive, that is moving its state to 'Switch On Disabled' state. The shorted path is transition (9) in which Master send Controlword of 0 to an operating driver.

EDS (CanOPEN) and XML (ETHERCAT) files

EDS File: https://www.nilab.at/download/mbd-tbs1-eds-file/?wpdmdl=2134&refresh=637351b05ed9d1668501936

XML File: https://www.nilab.at/download/mbd-tbs1-ethercat-eds-file/?wpdmdl=3335&refresh=637351b0868111668501936