CANOpen Memento-2.03 PDF
CANOpen Memento-2.03 PDF
CANOpen Memento-2.03 PDF
CANOpen Memento
Francis Dupin, November 2005
Version 1.2
I have put on this document some of the tips to test a node or to configure a CANOpen network.
If you do not know how works CANOpen, this document will not help you at all.
Feel free to redistribute this paper ... and to report the errors and missings to francis.dupin@inrets.fr
id rtr do d1 ...... d7
The data are put in CAN frame in lsb first (ie little endian).
Example : the number 0x01020304 should be embeded like this :
cobId rtr 04 03 02 01
Fct code
4 bits 7 bits
000 0 01 nodeId
000 0 02 nodeId
000 0 80 nodeId
000 0 81 nodeId
000 0 82 nodeId
Examples
To put the node 0x6 in operational mode : 000 01 06
To put all the nodes in pre-operational mode : 000 80 00
700 + 1
nodeID
700 + 0
nodeID
Examples
To ask for the node 5 its state, the master sends a CAN request (rtr = 1) : 705
The node 5 which is in stopped mode responds : 705 05
The master sends a NMT to put the node in pre-operational mode : 000 80 05
The master sends a new CAN request : 705
The node 5 which is now in pre-operational mode responds : 705 FF because the toggle = 1
Heartbeat protocol
The node transmit cyclically its state, without the need of a request frame :
700 + 0
nodeID
Bootup protocol
When a node enters in pre-operational mode after being in initializing mode, it sends :
700 + 0 00
nodeID
To write the data 0xd0d1... in the server node object dictionary, the client node sends :
Examples
To write the 1 byte data : 0xFD in the object dictionary of node 5, at index 0x1400, subindex 2, sends :
605 2F 00 14 02 FD 00 00 00
If success, the node 5 responds :
585 60 00 14 02 00 00 00 00
To write the 4 bytes data : 0x60120208 in the object dictionary of node 5, at index 0x1603, subindex 1, sends :
605 23 03 16 01 08 02 12 60
If success, the node 5 responds :
585 60 03 16 01 00 00 00 00
To read the data 0xd0d1... in the server node object dictionary, the client node sends :
Examples
To read the 1 byte data : 0xFD in the object dictionary of node 5, at index 0x1400, subindex 2, sends :
605 40 00 14 02 00 00 00 00
If success, the node 5 responds :
585 4F 00 14 02 FD 00 00 00
To read the 4 bytes data : 0x60120208 in the object dictionary of node 5, at index 0x1603, subindex 1, sends :
605 40 03 16 01 00 00 00 00
If success, the node 5 responds :
585 43 03 16 01 08 02 12 60
Example :
The PDO :
Example :
PDO request :
384 1
Example :
- Configuring the PDO 0x1400 + n
- Its cobId must be 0x183 (why not ?)
- The PDO is transmitted on synchro
- It must contains the data : data X (2 bytes) and data Y (4 bytes) in this order
- dataX is defined at index 0x6000 subindex 03
- dataY is defined at index 0x2010 subindex 21
To configure the PDO 1402 of the node 5 to be received every 3 syncchro, the SDO(s) to send should be (I have not tested) :
605 23 02 14 01 00 00 07 38
605 2F 02 14 02 03 00 00 00
605 2F 02 16 00 02 00 00 00
605 23 02 16 01 08 03 00 60
605 23 02 16 02 20 21 10 10
The PDO :
In most of the CANOpen networks, each slave node implements only one SDO server (index 1200), to be able to receive
SDO from a client node. By default, the slave node SDO functionality is well configured.
Usually, a slave node does not implement any SDO client, because it usually not need to send SDO to other nodes.
The case of the Master node is different if it must configure the slaves nodes.
To send SDO to slaves nodes, it should have several SDO clients (one for each slave).
This entries must be configured at index 1280, 1281, ...
Configuring the SDO client defined at index 0x1280 + n to communicate with the node nsl (slave node)
1 – Index 1280 + n, subindex 01 : write the cobId transmit (4 bytes) : 600 + nsl
2– subindex 02 : write the cobId receive (4 bytes) : 580 + nsl
3– subindex 03 : write the slave node id (1 byte) : nsl (Optional)
Index ...
One node can send cyclically the SYNC signal. This may be done by the master or by a slave node.
Example :
to send a SYNC every 10(dec) ms (1000 micro), write the value : 0x 2710
The SDO should be if it is the node 9: 609 23 06 10 00 10 27 00 00
To stop, write 0.
To start, write 0x40000080 at index 0x1005, subindex 0
Note that the node must be in operational mode to send the SYNC
80 0
Example :
to send a heartbeat every 100 ms, write the value : 0x 64
The SDO should be, if it is the node 9 : 609 2B 17 10 00 64 00 00 00
To stop, write 0.
Example :
The node is expecting 2 hearteats from the nodes :
« nodeid1 », at least every n1 milliseconds
« nodeid2 », atleast every n2 milliseconds
1 – Index 1016, subindex 00 : Number of heartbeats monitored. (4 bytes). For this ex, the value is « 2 ».
2- subindex 01 (4 bytes) : values for node 1 : 00 – nodeid1 (1 byte) – n1 (2 bytes)
3- subindex 02 (4 bytes) : values for node 2 : 00 – nodeid2 (1 byte) – n2 (2 bytes)
Example :
To configure the node 9 to expect heartbeats from
node 2 : at least every 100(dec) ms = 0x64
node 3 : at least every 400(dec) ms = 0x190
node 7 : at leats every 4000(dec) ms = 0xFA0
The SDO should be:
609 2B 16 10 00 03 00 00 00 // 3 entries
609 2B 16 10 01 64 00 02 00 // The data to write is 0x00020064
609 2B 16 10 02 90 01 03 00 // The data to write is 0x00030190
609 2B 16 10 03 A0 0F 07 00 // The data to write is 0x00070FA0