Size of CANOpen SDO confirmation frame

356 views Asked by At

I am writing my own CANOpen stack, and I want to implement the SDO server using C. The CiA CANOpen Application Layer Document specified that the SDO Request and Confirm Frames look as follows:

enter image description here

And some explanation provided as follows:

enter image description here

Based on my decoding of this picture, I gather that I am supposed to send 8 bytes in a SDO confirmation frame, but the 7 bytes will contain simply 0.

Is this correct?

PS: Sorry for the images if they are not clear.

1

There are 1 answers

0
Jos Seldenthuis On

Almost correct. An SDO CAN frame always contains 8 bytes, where the unused bytes are 0.

The confirmation frame, however, has 4 non-zero bytes. The first byte is the command specifier (0x60 in this case). The next three are the "multiplexer": two bytes for the object index (little-endian) and one byte for the sub-index.