Initialization of PDO objects on a UniDrive device¶
This initialization is usually done by the IDCP application. It is documented here in case another application must initialize the UniDrive.
The needed steps are documented in Document “SI-CANOpen User guide” which can be downloaded from UniDrive M700 Site.
Note
In order to download files from the UniDrive M700 Site you first have to create a free account.
Note
There are two CANOpen modules, the newer SI-CANOpen and the older SM-CANOpen module. The are almost identical. When there is a difference it is mentioned in the description below.
All initialization takes place by writing certain values on CANOpen SDO variables in a certain order to each UniDrive device.
Additionally, the UniDrive devices must be set in the “INITIALIZATION” state, before PDO variables can be defined. This is done by writing a simple CAN object data frame that is received by all UniDrive devices at the same time (see Setting the mode).
Setting the mode¶
In order to set up PDO objects, the UniDrive devices on a CAN bus segment must be set to the “INITIALIZATION” state first.
After all PDO objects are set up, the UniDrive devices must be set to the “OPERATIONAL” state.
State changes are done by writing to a special CAN object a special value. This value is receiver by all participants on the CAN bus:
Action: RESET NODE (go to INITIALIZATION state)
CAN Write
COB:0, Length:2 Bytes, Value:129
Action: <Initialize PDO>
Action: START_REMOTE_NODE (go to OPERATIONAL state)
CAN Write:
COB:0, Length:2 Bytes, Value:1
The PDO and SYNC COB initialization¶
All initialization below uses the CANOpen SDO variables. Each Unidrive device is addressed by it’s unique CAN NODE-ID which starts with 1 for the first axle. Each CANOpen SDO variable has an index and a subindex, the data length varies between 1 and 4 bytes.
The following initialization must be done for each Unidrive after it has received the RESET NODE command (see Setting the mode).
The PDO variables that are used are named according to the naming convention in the Unidrive documentation:
Tx3, Tx5, Tx6 : CANOpen write-PDOs on the Unidrive
Rx1, Rx3, Rx5, Rx6 : CANOpen read-PDOs on the Unidrive
Definition of the SYNC COB¶
The COB of the CAN SYNC object is defined like this:
Action: Define SYNC COB
CAN SDO Write:
Index:0x1005, Subindex:0, Type:4-Byte Int, Value:128
Initialize Tx3 PDO, CAN_STATUS¶
Action: Mapno:=0
CAN SDO Write:
Index:0x1A02, Subindex:0, Type:1-Byte Int, Value:0
Action: Set Tx3 COB
CAN SDO Write:
Index:0x1802, Subindex:1, Type:4-Byte Int,
Value SM-CANOpen : 0x40000520 + NODE-ID
Value SI-CANOpen : 0x520 + NODE-ID
Note: with the SM-CANOpen 0x4000000000 means "RTR disable".
Note: COB-ID here is 0x520 + NODE-ID
Action: Set Tx3 Transmission type
CAN SDO Write:
Index:0x1802, Subindex:2, Type:1-Byte Int, Value:1
Action: Set Tx3 Mapping
CAN SDO Write:
Index:0x1A02, Subindex:1, Type:4-Byte Int, Value:0x20141920
Note: This maps register 20.25. The value is calculated like in
this python expression:
hex(((0x2000+20)<<16)+(25<<8)+32)
Action: Mapno:=1
CAN SDO Write:
Index:0x1A02, Subindex:0, Type:1-Byte Int, Value:1
Initialize Tx5 PDO, CAN_CURR_POS¶
Action: Mapno:=0
CAN SDO Write:
Index:0x1A04, Subindex:0, Type:1-Byte Int, Value:0
Action: Set Tx5 COB
CAN SDO Write:
Index:0x1804, Subindex:1, Type:4-Byte Int
Value SM-CANOpen : 0x40000540 + NODE-ID
Value SI-CANOpen : 0x540 + NODE-ID
Note: with the SM-CANOpen 0x4000000000 means "RTR disable".
Note: COB-ID here is 0x540 + NODE-ID
Action: Set Tx5 Transmission type
CAN SDO Write:
Index:0x1804, Subindex:2, Type:1-Byte Int, Value:1
Action: Set Tx5 Mapping
CAN SDO Write:
Index:0x1A04, Subindex:1, Type:4-Byte Int, Value:0x20141a20
Note: This maps register 20.26. The value is calculated like in
this python expression:
hex(((0x2000+20)<<16)+(26<<8)+32)
Action: Mapno:=1
CAN SDO Write:
Index:0x1A04, Subindex:0, Type:1-Byte Int, Value:1
Initialize Tx6 PDO, CAN_TABLE_DELTA¶
Action: Mapno:=0
CAN SDO Write:
Index:0x1A05, Subindex:0, Type:1-Byte Int, Value:0
Action: Set Tx6 COB
CAN SDO Write:
Index:0x1805, Subindex:1, Type:4-Byte Int
Value SM-CANOpen : 0x40000560 + NODE-ID
Value SI-CANOpen : 0x560 + NODE-ID
Note: with the SM-CANOpen 0x4000000000 means "RTR disable".
Note: COB-ID here is 0x560 + NODE-ID
Action: Set Tx6 Transmission type
CAN SDO Write:
Index:0x1805, Subindex:2, Type:1-Byte Int, Value:1
Action: Set Tx6 Mapping
CAN SDO Write:
Index:0x1A05, Subindex:1, Type:4-Byte Int, Value:0x20141b20
Note: This maps register 20.27. The value is calculated like in
this python expression:
hex(((0x2000+20)<<16)+(27<<8)+32)
Action: Mapno:=1
CAN SDO Write:
Index:0x1A05, Subindex:0, Type:1-Byte Int, Value:1
Initialize Rx1 PDO, CAN_SPEED_VAR¶
Action: Mapno:=0
CAN SDO Write:
Index:0x1600, Subindex:0, Type:1-Byte Int, Value:0
Action: Set Rx1 COB
CAN SDO Write:
Index:0x1400, Subindex:1, Type:4-Byte Int
Value SM-CANOpen : 0x40000518
Value SI-CANOpen : 0x518
Note: with the SM-CANOpen 0x4000000000 means "RTR disable".
Note: COB-ID here is 0x518
Action: Set Rx1 Transmission type
CAN SDO Write:
Index:0x1400, Subindex:2, Type:1-Byte Int, Value:255
Action: Set Rx1 Mapping
CAN SDO Write:
Index:0x1600, Subindex:1, Type:4-Byte Int, Value:0x20141820
Note: This maps register 20.24. The value is calculated like in
this python expression:
hex(((0x2000+20)<<16)+(24<<8)+32)
Action: Mapno:=1
CAN SDO Write:
Index:0x1600, Subindex:0, Type:1-Byte Int, Value:1
Initialize Rx3 PDO, CAN_BROADCAST¶
Action: Mapno:=0
CAN SDO Write:
Index:0x1602, Subindex:0, Type:1-Byte Int, Value:0
Action: Set Rx3 COB
CAN SDO Write:
Index:0x1402, Subindex:1, Type:4-Byte Int
Value SM-CANOpen : 0x40000500
Value SI-CANOpen : 0x500
Note: with the SM-CANOpen 0x4000000000 means "RTR disable".
Note: COB-ID here is 0x500
Action: Set Rx3 Transmission type
CAN SDO Write:
Index:0x1402, Subindex:2, Type:1-Byte Int, Value:255
Action: Set Rx3 Mapping
CAN SDO Write:
Index:0x1602, Subindex:1, Type:4-Byte Int, Value:0x20141520
Coding: Reg.20.21: hex(((0x2000+20)<<16)+(21<<8)+32)
Action: Mapno:=1
CAN SDO Write:
Index:0x1602, Subindex:0, Type:1-Byte Int, Value:1
Initialize Rx5 PDO, CAN_MAX_TIME¶
Action: Mapno:=0
CAN SDO Write:
Index:0x1604, Subindex:0, Type:1-Byte Int, Value:0
Action: Set Rx5 COB
CAN SDO Write:
Index:0x1404, Subindex:1, Type:4-Byte Int
Value SM-CANOpen : 0x40000508
Value SI-CANOpen : 0x508
Note: with the SM-CANOpen 0x4000000000 means "RTR disable".
Note: COB-ID here is 0x508
Action: Set Rx5 Transmission type
CAN SDO Write:
Index:0x1404, Subindex:2, Type:1-Byte Int, Value:255
Action: Set Rx5 Mapping
CAN SDO Write:
Index:0x1604, Subindex:1, Type:4-Byte Int, Value:0x20141620
Note: This maps register 20.22. The value is calculated like in
this python expression:
hex(((0x2000+20)<<16)+(22<<8)+32)
Action: Mapno:=1
CAN SDO Write:
Index:0x1604, Subindex:0, Type:1-Byte Int, Value:1
Initialize Rx6 PDO, CAN_DATA_ITEM¶
Action: Mapno:=0
CAN SDO Write:
Index:0x1605, Subindex:0, Type:1-Byte Int, Value:0
Action: Set Rx6 COB
CAN SDO Write:
Index:0x1505, Subindex:1, Type:4-Byte Int
Value SM-CANOpen : 0x40000510 + DRIVE
Value SI-CANOpen : 0x510 + DRIVE
Note: with the SM-CANOpen 0x4000000000 means "RTR disable".
Note: COB-ID here is 0x510 + DRIVE
Note: DRIVE is 0 for the gap- and 1 for the shift drive
Action: Set Rx6 Transmission type
CAN SDO Write:
Index:0x1405, Subindex:2, Type:1-Byte Int, Value:255
Action: Set Rx6 Mapping
CAN SDO Write:
Index:0x1605, Subindex:1, Type:4-Byte Int, Value:0x20141720
Note: This maps register 20.23. The value is calculated like in
this python expression:
hex(((0x2000+20)<<16)+(23<<8)+32)
Action: Mapno:=1
CAN SDO Write:
Index:0x1605, Subindex:0, Type:1-Byte Int, Value:1