3 basics - service data objects (sdos), 1 addressing through index and subindex, Basics - service data objects (sdos) – Lenze Function library CANopenSdoDrv User Manual
Page 7: Addressing through index and subindex

DMS 1.0 EN - 07/2011 - TD05
L
7
Function library "CANopenSdoDrv"
Basics - Service Data Objects (SDOs)
Addressing through index and subindex
3
Basics - Service Data Objects (SDOs)
"Service Data Objects" (abbreviated with SDOs) serve to exchange data of any length and
data type between two CAN nodes. The exchange takes place according to the client server
model:
As an "SDO client", a CAN node accesses data of a the other CAN node ("SDO server) by
writing (download) or reading (upload). This data is located in the object directory of the
SDO server and is addressed by the SDO client via the given index and subindex. Each
access of the SDO client will be acknowledged by the SDO server.
The connection between the SDO client and the SDO server is also called parameter
channel. Each CANopen node must at least support one parameter channel ("default SDO")
to be accessible for other nodes. For Lenze devices, it is the parameter channel 1.
As a CAN telegram can only transmit 8 bytes, SDOs are typically transmitted in a sequence
of segments. For initialising the data transfer, the SDO client first sends a telegram to the
SDO server in which the SDO server is instructed in which way (reading/writing) it is to
access which index/subindex of the SDO server. The acknowledgement of the telegram by
the SDO server completes the initialisation phase and the segmented transmission of the
data starts.
If only up to 4 bytes of data are to be transferred, the reduced transfer ("expedited
transfer") can be used as well. In this transfer mode, the data is already transferred during
the initialisation phase with the first telegram.
The reduced transfer ("expedited transfer") must be supported by the SDO client and the
SDO server according to the CANopen specification. It is switched to the segmented
transfer if more than 4 bytes of data must be transferred.
The least-significant byte (LSB) of the CAN telegram is reserved for the command. Among
other things, the command contains information on the access type (writing/reading) and
the transfer type (segmented/expedited).
3.1
Addressing through index and subindex
The parameters or Lenze codes are addressed according to the following formula:
Index = 24575 – (Lenze code number + 2000 (parameter set – 1))
Example:
The acceleration time (code C1312) in the parameter set 2 is to be addressed. This code has
the subindex 0 (no subindex).
Calculation:
Index = 24575 – 12 – 2000 = 22563 = 5823hex
Subindex = 0
Tip!
For converting a code number into the required CAN index, you can use the
L_FUNCodeIndexConv function from the »LenzeDrive.lib« library.