Service data object (SDO)
Service data objects (SDOs) enable access to all entries of a CANopen object dictionary. One SDO consists of two CAN data frames with different CAN-Identifiers. This is a confirmed communication service. With an SDO, a peer-to-peer client-server communication between two CANopen devices can be established on the broadcast medium CAN. The owner of the accessed object dictionary acts as a server of the SDO. The device that accesses the object dictionary of the other device is the SDO client.
Variants of the SDO protocol
A CANopen device can support different variants of the SDO protocol:
- The expedited transfer,
- the normal (segmented) transfer, or
- the block transfer.
During this initiation, the client device indicates which information is going to be accessed from the server's object dictionary, which SDO type is used, and if the information is to be read or written. The server device acknowledges the inquiry and the client device then starts to transmit the first data segment. The normal transfer allows to communicate any amount of data in a segmented way. Each segment can carry up to seven byte of application data, as one byte of the CAN frame is required for protocol information. In normal SDO transfer (see figure) an unlimited number of segments and therefore of application data can be exchanged.
To speed up an SDO transfer of small amounts of data (less or equal 4 byte), the expedited SDO transfer can be used. In such an SDO connection, the data is directly transferred during the initiation of the SDO connection. Speeding up the transmission of huge amounts of data can be achieved by supporting the SDO block transfer. During the block transfer, no single data segment (like during the normal transfer) but only a block of data (up to 127 segments) is confirmed by the receiver.
Device manufacturers should base their choice of SDO variant on the amount of data that a device is going to communicate.
A CANopen device may support SDO client or server channels. In case a device supports SDO client channels, the device is able to access the object dictionaries of other network participants. By supporting server channels, device manufacturers give other network participants the opportunity to access object dictionary entries on their device. Device manufacturers must evaluate whether their device needs to access other devices (e.g. a controller that configures other network participants) or whether other devices have to access their device (e.g. for configuration purposes). After this evaluation, device manufacturers can assess how many SDO client and server channels will be required. The first SDO server channel is strictly predefined by the specification and has to be supported by all CANopen devices.
SDO parameter set
The SDO parameter sets are arranged in the object dictionary index range 12xxh. The SDO server channels are described in the range from 1200h to 127Fh. The parameter sets of the client channels have to be provided in the range from 1280Fh to 12FFh. A SDO parameter set contains the two communication object identifiers (COB-IDs) and the node-ID of the related communication partner. The COB-ID entries cover the CAN-Identifiers of the CAN frames used to transmit information in the direction "server to client" and vice versa.