Library used: https://github.com/autowp/arduino-mcp2515
Useful Links:
- https://en.wikipedia.org/wiki/CANopen
- https://www.generationrobots.com/media/roboteq/can-networking-manual.pdf#page=18&zoom=130,-126,604
- https://en.wikipedia.org/wiki/CANopen#Object_dictionary
Response from the roboteq device:
| Header | DLC | Byte 0 | Byte 1 - 2 | Byte 3 | Byte 4 - 7 |
|---|---|---|---|---|---|
0x600 + nd |
8 |
see Byte 0 table | index | subindex | data |
Byte 0 table:
| bits 4-7 | bits 2-3 | bits 0-1 |
|---|---|---|
ccs=1 |
n |
xx=0 |
*each section of Byte 0 is a 4-bit unsigned int
-
ccsis the client command specifier of the SDO transfer, this is0for SDO segment download,2for command,4for query,6for successful,8for error -
nis the amount of bytes that will hold no data -
xxis always0as we are using using expedited transfer -
indexis the object dictionary index of the data to be accessed -
subindexis the subindex of the object dictionary variable -
datacontains the data to be uploaded (the response will only contain data if request object is a query format)
Please see page 33 and onward to view available commands/queries in the CAN networking manual.