meta data for this page
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 Control Word is mapped at index 0x6040 subindex 0 with size of 2byte.
The Status Word is mapped at index 0x6041 subindex 0 with size of 2byte
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 | STATUSWORD_INTERNAL_LIMIT_ACTIVE | |
| 12 | STATUSWORD_IP_MODE_ACTIVE | Interpolated positioning |
| 12 | STATUSWORD_SPEED | Profile velocity |
| 13 | STATUSWORD_MAX_SLIPPAGE_ERR | Profile velocity |
| 12 | STATUSWORD_HOMING_ATTAINED | Homing |
| 13 | STATUSWORD_HOMING_ERROR | Homing |
| 12 | STATUSWORD_SETPOINT_ACK | Profile positioning |
| 13 | STATUSWORD_FOLLOWING_ERROR | Profile positioning |
CONTROL WORD Register
| BIT Number | Description | Mode of operation |
| 0 | CTRLWORD_BIT_SWITCH_ON | |
| 1 | CTRLWORD_BIT_EN_VOLTAGE | |
| 2 | CTRLWORD_BIT_QUICK_STOP | |
| 3 | CTRLWORD_BIT_EN_OPERATION | |
| 4 | CTRLWORD_HOME_START | Homing |
| 4 | CTRLWORD_ENABLE_IP_MODE | Interpolated positiong |
| 4 | CTRLWORD_NEW_SETPOINT | Profile positioning |
| 5 | CTRLWORD_CHANGE_SET_NOW | Profile positioning |
| 6 | CTRLWORD_ABS_REL_POSITION | Profile positioning |
| 7 | CTRLWORD_BIT_FAULT_RESET | |
| 8 | CTRLWORD_BIT_HALT |
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)
From the specification when disabled you need to pass from SWITCH ON.
DISABLED to READY TO SWITCH ON then to SWITCHED ON then finally OPERATION ENABLED
For example: You do that through the controlword where you set bit1 and bit 2 with bit 0 and bit 3 reset (0x06 READY TO SWITCH ON) then you set bit 0,bit1 and bit 2(0x07 READY TO SWITCH ON) them finally bit0,bit1,bit2,bit3 all set (0x0F OPERATION ENABLED).
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.
