Service Data Objects (SDO)

The parameters listed in the object directory are read and written by means of service data objects. These SDOs are Multiplexed Domains, i.e. data structures of any size that have a multiplexer (address). The multiplexer consists of a 16-bit index and an 8-bit sub-index that address the corresponding entries in the object directory.

Service Data Objects (SDO) 1:
SDO protocol: access to the object directory

The CANopen Bus Couplers are servers for the SDO, which means that at the request of a client (e.g. of the IPC or the PLC) they make data available (upload), or they receive data from the client (download). This involves a handshake between the client and the server.

When the size of the parameter to be transferred is not more than 4 bytes, a single handshake is sufficient (one telegram pair): For a download, the client sends the data together with its index and sub-index, and the server confirms reception. For an upload, the client requests the data by transmitting the index and sub-index of the desired parameter, and the server sends the parameter (including index and sub-index) in its answer telegram.

The same pair of identifiers is used for both upload and download. The telegrams, which are always 8 bytes long, encode the various services in the first data byte. All parameters with the exception of objects 1008h, 1009h and 100Ah (device name, hardware and software versions) are only at most 4 bytes long, so this description is restricted to transmission in expedited transfer.

Protocol

The structure of the SDO telegrams is described below.

Client -> Server, Upload Request

11 bit identifier

8 byte user data

0x600 (=1536dec) + node ID

0x40

Index0

Index1

SubIdx

0x00

0x00

0x00

0x00

Parameter

Explanation

Index0

Index low byte (Unsigned16, LSB)

Index1

Index high byte (Unsigned16, MSB)

SubIdx

Sub-index (Unsigned8)

Client -> Server, Upload Response

11 bit identifier

8 byte user data

0x580 (=1408dec) + node ID

0x4x

Index0

Index1

SubIdx

Data0

Data1

Data2

Data3

Parameter

Explanation

Index0

Index low byte (Unsigned16, LSB)

Index1

Index high byte (Unsigned16, MSB)

SubIdx

Sub-index (Unsigned8)

Data0

Data low low byte (LLSB)

Data3

Data high high byte (MMSB)

Parameters whose data type is Unsigned8 are transmitted in byte D0, parameters whose type is Unsigned16 use D0 and D1.

The number of valid data bytes is coded as follows in the first CAN data byte (0x4x):

Number of parameter bytes

1

2

3

4

First CAN data byte

0x4F

0x4B

0x47

0x43

Client -> Server, Download Request

11 bit identifier

8 byte user data

0x600 (=1536dec) + node ID

0x22

Index0

Index1

SubIdx

Data0

Data1

Data2

Data3

Parameter

Explanation

Index0

Index low byte (Unsigned16, LSB)

Index1

Index high byte (Unsigned16, MSB)

SubIdx

Sub-index (Unsigned8)

Data0

Data low low byte (LLSB)

Data3

Data high high byte (MMSB)

It is optionally possible to give the number of valid parameter data bytes in the first CAN data byte

Number of parameter bytes

1

2

3

4

First CAN data byte

0x2F

0x2B

0x27

0x23

This is, however, not generally necessary, since only the less significant data bytes up to the length of the object directory entry that is to be written are evaluated. A download of data up to 4 bytes in length can therefore always be achieved in BECKHOFF bus nodes with 22 h in the first CAN data byte.

Client -> Server, Download Response

11 bit identifier

8 byte user data

0x580 (=1408dec) + node ID

0x60

Index0

Index1

SubIdx

0x00

0x00

0x00

0x00

Parameter

Explanation

Index0

Index low byte (Unsigned16, LSB)

Index1

Index high byte (Unsigned16, MSB)

SubIdx

Sub-index (Unsigned8)

Breakdown of Parameter Communication

Parameter communication is interrupted if it is faulty. The client or server send an SDO telegram with the following structure for this purpose:

11 bit identifier

8 byte user data

0x580 (client) or
0x600 (server) + node ID

0x80

Index0

Index1

SubIdx

Error0

Error1

Error2

Error3

Parameter

Explanation

Index0

Index low byte (Unsigned16, LSB)

Index1

Index high byte (Unsigned16, MSB)

SubIdx

Sub-index (Unsigned8)

Error0

SDO error code low low byte (LLSB)

Error3

SDO error code high high byte (MMSB)

List of SDO error codes (reason for abortion of the SDO transfer):

SDO error code

Explanation

0x05 03 00 00

Toggle bit not changed

0x05 04 00 01

SDO command specifier invalid or unknown

0x06 01 00 00

Access to this object is not supported

0x06 01 00 02

Attempt to write to a Read_Only parameter

0x06 02 00 00

The object is not found in the object directory

0x06 04 00 41

The object cannot be mapped into the PDO

0x06 04 00 42

The number and/or length of mapped objects would exceed the PDO length

0x06 04 00 43

General parameter incompatibility

0x06 04 00 47

General internal error in device

0x06 06 00 00

Access interrupted due to hardware error

0x06 07 00 10

Data type or parameter length do not agree or are unknown

0x06 07 00 12

Data type does not agree, parameter length too great

0x06 07 00 13

Data type does not agree, parameter length too short

0x06 09 00 11

Sub-index not present

0x06 09 00 30

General value range error

0x06 09 00 31

Value range error: parameter value too great

0x06 09 00 32

Value range error: parameter value too small

0x06 0A 00 23

Resource not available

0x08 00 00 00

General error

0x08 00 00 21

Access not possible due to local application

0x08 00 00 22

Access not possible due to current device status

Further, manufacturer-specific error codes have been introduced for register communication (index 0x4500, 0x4501):

SDO error code

Explanation

0x06 02 00 11

Invalid table: Table or channel not present

0x06 02 00 10

Invalid register: table not present

0x06 01 00 22

Write protection still set

0x06 07 00 43

Incorrect number of function arguments

0x06 01 00 21

Function still active, try again later

0x05 04 00 40

General routing error

0x06 06 00 21

Error accessing BC table

0x06 09 00 10

General error communicating with terminal

0x05 04 00 47

Time-out communicating with terminal