Object Directory Table
This section describes the configuration table representing the CANopen object directory. This is the central element of the CANopen node. This table can be placed in RAM or in ROM. The placement decides, which access type is possible with direct entries. Most likely this table is placed in ROM, because RAM is in most cases the limited resource.
Each line represents a single object entry definition. The collection of object entries shall be sorted in ascending order in index and subindex.
The following sections describes the details of the table members.
Object Entry Key
The object entry key [CPU_INT32U] shall be constructed with the following macro:
CO_DEV(<index>, <subindex>, <specification>)
The index is a 16bit value with possible range from 0x0000 to 0xFFFF
The subindex is a 8bit value with possible range from 0x00 to 0xFF
Note: to be compliant to the CANopen specification, the defined index and subindex ranges shall be considered.
The object specification shall be set to a bitwise disjunction of the listed values for object entry size and the object access mode.
Object Entry Size | Description |
---|---|
CO_UNSIGNED8 |
CANopen Datatype: UNSIGNED8 |
CO_UNSIGNED16 |
CANopen Datatype: UNSIGNED16 |
CO_UNSIGNED32 |
CANopen Datatype: UNSIGNED32 |
CO_SIGNED8 |
CANopen Datatype: SIGNED8 |
CO_SIGNED16 |
CANopen Datatype: SIGNED16 |
CO_SIGNED32 |
CANopen Datatype: SIGNED32 |
CO_DOMAIN |
CANopen Datatype: DOMAIN |
CO_STRING |
CANopen Datatype: STRING |
Object entry access mode field shall be set to one of the following values:
Object Access Mode | Description |
---|---|
CO_OBJ____R_ |
Read Only |
CO_OBJ_____W |
Write Only |
CO_OBJ____RW |
Read/Write |
CO_OBJ___PR_ |
Read Only, PDO Map |
CO_OBJ___P_W |
Write Only, PDO Map |
CO_OBJ___PRW |
Read/Write, PDO Map |
CO_OBJ__N_R_ |
Read Only, + Node-Id |
CO_OBJ__N__W |
Write Only, - Node-Id |
CO_OBJ__N_RW |
Read/Write, +/- Node-Id |
CO_OBJ__NPR_ |
Read Only, PDO Map, + Node-Id |
CO_OBJ__NP_W |
Write Only, PDO Map, - Node-Id |
CO_OBJ__NPRW |
Read/Write, PDO Map, +/- Node-Id |
CO_OBJ_D__R_ |
Read Only, Direct Access |
CO_OBJ_D___W |
Write Only, Direct Access |
CO_OBJ_D__RW |
Read/Write, Direct Access |
CO_OBJ_DN_R_ |
Read Only, + Node-Id, Direct Access |
CO_OBJ_DN__W |
Write Only, - Node-Id, Direct Access |
CO_OBJ_DN_RW |
Read/Write, +/- Node-Id, Direct Access |
Note: The access types read only, write only and read/write specifies the possible access types from the CANopen network to that object entry. The application is always able to read and write the object entry.
When placing the object entry table in read only memory (with keyword "const"), the direct access modes (tread pointer as object entry value), are limited to read only access, even by the application.
Object Type Reference
The object entry type structure reference [CO_OBJ_TYPE *] shall be set to one of the following values:
Object Type | Description |
---|---|
0 (zero) |
Basic type, no special handling |
CO_TASYNC |
Asynchronous PDO signal entry |
CO_TDOMAIN |
Domain entry |
CO_TEMCY |
EMCY history entry |
CO_TEVENT |
PDO event timer entry |
CO_THEARTBEAT |
Heartbeat entry |
CO_TPARA |
Parameter group store/restore entry |
CO_TPDOID |
Dynamic PDO identifier entry |
CO_TPDOMAP |
Dynamic PDO mapping entry |
CO_TPDONUM |
Dynamic PDO number of mapping entries |
CO_TPDOTYPE |
Dynamic PDO transmission type entry |
CO_TSDOID |
Dynamic SDO identifier entry |
CO_TSTRING |
Unlimited read only string |
Object Data Reference
The object data reference [CPU_INT32U] shall be set in dependence to the object flags and the object type structure reference to different values.
Object Type | Object Flags | Required Content in Data Pointer |
0 (zero) |
CO_OBJ__xxxx |
address of variable |
CO_OBJ_Dxxxx |
value in data pointer | |
CO_TASYNC |
N/A |
address of variable |
CO_TDOMAIN |
address of domain info structure | |
CO_TEMCY |
address of EMCY history entry | |
CO_TEVENT |
address of variable | |
CO_THEARTBEAT |
address of variable | |
CO_TPARA |
address of parameter group info structure | |
CO_TPDOID |
address of variable | |
CO_TPDOMAP |
address of variable | |
CO_TPDONUM |
address of variable | |
CO_TPDOTYPE |
address of variable | |
CO_TSDOID |
address of variable | |
CO_TSTRING |
start address of string |