Menu

A: CANopen is a communication protocol that uses several classes of "objects" for managing a network of motor controller,s sensors, PLCs and other devices. A complete description of CANopen can be found on Wikipedia. One class of such "objects" is Service Data Objects or SDO's. SDO's can be uses to query any operating parameter (speed, amps, volts, inputs states, ..), and to send any command (speed, position, outputs on/off, ...)

SDO frames are simple enough that they can be "manually" constructed and parsed in a microcomputer in order to interface to Roboteq products, without the need to implement the full CANopen standard.

The directives below are a simplified description of the CANOpen SDO mechanism. A CANOpen command/query towards a Roboteq device can be analyzed as shown below:

co1

• nd is the destination node id.
• ccs is the Client Command Specifier, if 2 it is command if 4 it is query.
• n is the Number of bytes in the data part, which do not contain data
• xx not necessary for basic operation. For more details advise CANOpen standard.
• index is the object dictionary index of the data to be accessed
• subindex is the subindex of the object dictionary variable
• data contains the data to be uploaded

 

The Response from the roboteq device is as shown below:

co2

• nd is the source node id.
• ccs is the Client Command Specifier, if 4 it is query response, 6 it is a successfull response to command, 8 is an error in message received.
• n is the Number of bytes in the data part, which do not contain data
• xx not necessary for the simplistic way. For more details advise CANOpen standard.
• index is the object dictionary index of the data to be accessed.
• subindex is the subindex of the object dictionary variable
• data contains the data to be uploaded. Appliccable only if css=4.

The complete list of supported commands and queries, their Id, and the type/length of the data field can be found in the CANopen object directory table in the user manual

SDO Example 1: Set Encoder Counter 2 (C) of node 1 value 10

• nd = 1, since the destination’s node id is 1.
• ccs = 2, since it is a command.
• n = 0 since all 4 bytes of the data are used (signed32).
• index = 0x2003 and subindex = 0x02 according to object dictionary.

co-ex1-1

The respective response will be:

co-ex-1-2

SDO Example 2: Activate emergency shuttdown (EX) for node 12

co-ex-2-1

• nd = 12, since the destination’s node id is 12.
• ccs = 2, since it is a command.
• n = 3 since only one byte of the data is used (unsigned8).
• index = 0x200C and subindex = 0x00 according to object dictionary.

The respective response will be:

co-ex-2-2

SDO Example 3: Read Battery Volts (V) of node 1

co-ex-3-1

• nd = 1, since the destination’s node id is 1.
• ccs = 4, since it is a query.
• n = 2 since 2 bytes of the data are used (unsigned16).
• index = 0x210D and subindex = 0x02 according to object dictionary.

The respective response will be:

co-ex-3-2

• nd = 1, since the source node id is 1.
• ccs = 4, since it is a query response.
• n = 2 since 2 bytes of the data are used (unsigned16).
• index = 0x210D and subindex = 0x02 according to object dictionary.
• data = 0x190 = 400 = 40 Volts.

Go to top