etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: CANOpen object dictionary Configuration etisserant@0: etisserant@0: etisserant@0: etisserant@0:

Object dictionary for Node :

etisserant@0:

etisserant@0: Linux_slaveslave etisserant@0:

etisserant@0:

Overview

etisserant@0:

etisserant@0: How to make the object dictionary of the node ? etisserant@0: First, use Jaxe (command run_objdict) to edit an xml description file etisserant@0: of the dictionary : objdict.xml. etisserant@0: Then, run the php program : makeobjetdict.php. You can launch php through a web browser etisserant@0: if you have installed a server, or, on Linux, you can launch php in command line : etisserant@0: php-cgi makeobjetdict.php. It compute the file objdict.c. Link it to etisserant@0: your project. etisserant@0:
Note : To define the node id, use in your code the function setNodeId(UNS8 nodeId) etisserant@0:

etisserant@0:

etisserant@0: Then the node can be connected to the network. The master must configure it etisserant@0: by sending SDO. It will write values in its index, subindex. What to configure ? etisserant@0:

etisserant@0:

etisserant@0: To avoid configuring the node at the connection, you can put the values directly etisserant@0: in the dictionary objdict.c. But it is boring and unsafe because it is too easy to make etisserant@0: a mistake ! etisserant@0: etisserant@0: etisserant@0:

Number of heartbeat consumers : etisserant@0: 1 etisserant@0:

etisserant@0:

This means that the node can expect heartbeats sent by 1 nodes.

etisserant@0:

Number of SDO clients : etisserant@0: 1 etisserant@0:

etisserant@0:

Usualy, a slave node does not have the use of SDO clients, but etisserant@0: today, for the library, you must define one. The Master, which can etisserant@0: send SDO to "n" slaves nodes, must define here "n" SDO etisserant@0: clients. Remember that in most cases, the SDO protocol is used by etisserant@0: the master to configure a slave dictionary or read a value. In etisserant@0: this use, the master is the client, and the slave is the server.

etisserant@0:

Maximum objects in a PDO (receive or transmit) : etisserant@0: 8 etisserant@0:

etisserant@0:

This is defining how many variables can be transmited in a etisserant@0: PDO. (maximum is 8).

etisserant@0:

For each variable, a table is created, so if you have less room etisserant@0: in memory, put a value under 8.

etisserant@0:

Number of PDO receive : etisserant@0: 3 etisserant@0:

etisserant@0:

The node can receive 3 PDO.

etisserant@0:

The communication parameters are defined at index 0x1400 to 0x1400 + 2

etisserant@0:

The mapping parameters are defined at index 0x1600 to 0x1600 + 2

etisserant@0:

Number of PDO transmit : etisserant@0: 3 etisserant@0:

etisserant@0:

The node can transmit 3 PDO.

etisserant@0:

The communication parameters are defined at index 0x1800 to 0x1800 + 2

etisserant@0:

The mapping parameters are defined at index 0x1A00 to 0x1A00 + 2

etisserant@0:

Mapped variables and tables

etisserant@0:

3 tables are defined for the mapping, starting at index 0x2000, 0x6000 and 0x6200. etisserant@0: You must start the mapping at the beginning of one of a table, without holes in index etisserant@0: or subindex. For example, variables in 0x2000 and 0x2001 is ok, but variables in 0x2000 and 0x2002 is not allowed, because you are loosing room in memory. It is the same for the subindex. etisserant@0:

etisserant@0:

etisserant@0: The access of the variable is by default "rw" (read-write) or "ro" (read-only). A read-only variable cannot be mapped in a PDO receive. etisserant@0:

etisserant@0:

Here are some others rules for the mapping :

etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0: etisserant@0:
Var NameBitsIndexSub-indexaccess
seconds80x20000x1rw
minutes80x20000x02rw
hours80x20000x3rw
day80x20000x4rw
canopenErrNB320x60000x0rw
canopenErrVAL320x60010x0rw
Table NameBitsIndexSub-indexaccess
etisserant@0: etisserant@0: