Skip to content

Object Dictionary Tab

Robin Cornelius edited this page Dec 8, 2016 · 7 revisions

The Object dictionary tab is the heart of the application. It allows the user to add,edit or delete any object dictionary entry. It does not enforce strict CanOpen compliance but it does guide you in the correct direction.

There are 3 main groups of entries :-

  • Compulsory objects
  • Optional Objects
  • Manufacturer Objects

OD List

Compulsory objects are the required objects for a CanOpen node to function. This usually contains 3 items for index 0x1000,0x1001 and 0x1018.

Optional objects are objects that are specific to one or more CanOpen profiles. As a minimum the DS301 profile is usually implemented. This provides the data needed for EMCY messages, Heartbeat and guarding messages, SDO parameters and RX and TX PDO mappings and setup.

Additional profiles may be added to support additional features such as analogue ins/outs, digital ins/out etc

Manufacture objects are any extra objects that a device creator adds to a device but are not specific to a profile.

Using the editor

Simply click on one of the objects in one of the 3 lists and the details will be displayed on the right hand side. Objects that are disabled will be shown in a faded grey color. NB disabled objects will not export but will save in the XML file. If you right click on a specific object a context menu will be shown with the following options

  • Add new object
  • Delete object
  • Disable object

Add new object allows you to add a new item to the object dictionary. After clicking on it a dialog window will open

New OD Index dialog

First choose the index that you require for your new object, it can be anything within the CanOpen object dictionary range from 0x1000-0xFFFF although some entries may be outside the CanOpen specification

Next give your object a name, the name will appear in the object dictionary, the eds file and also form part of the C name that is used if you use the CanOpenNode exporter.

Object type, 3 major object types are supported :-

  • Var - A regular variable
  • Array - An array of 1 or more regular variables
  • Rec - A group of different regular variables, all may be different types and all may have unique names

Data type - This only applies to a VAR or a ARRAY object, this is the either the type of the variable for VAR or the type of all the sub indexes for ARRAY.

Finally if you are creating an ARRAY you can choose how many sub indexes to create. NB arrays always have subindex 0 as a unsigned8 that sets the max subindex of the array.

After you are happy press "Create", or "Cancel" to quit this screen

Object Details view - sub object list

After clicking on an object from one of the 3 lists you will see the object details view

Object Dictionary details

This view shows all the avaiable subindexs of a particular Object Dictionary entry. If the object is a simple VAR then only one line will be shown.

The first line is always the parent (or var) object details and there is no subindex. It shows Name, Object Type, Data Type, Access rights, the default value and if the object is allowable for PDO mapping. Below the first line details of all the sub objects are shown in much the same way.

The following subtleties exist. For array objects you can only set/change the data type of the parent object. All the child objects (except sub index 0) will then obtain the same data type. For an array object, subindex 0 is always a UNSIGNED8 and its value is the max allowable subindex. The default value is usually the same as the number of sub objects (excluding sub index 0 itself) but this is not a requirement and some objects allow other values here. If a value that is different to the number of subobjects is used here it is important that in the implementation this is correctly handled. Examples of this behaviour are object 0x1003 where subindex 0 records the number of current errors not the array size. And 0x1011 where subindex of 0x7f are used to do a ROM reset within CanOpen Node. The important thing to take away from this is objects that allow this behaviour implement their own routines inside CanOpenNode to handle the object dictionary access. Default access will cause a crash/undefined behaviour within your MCU.

If you click on any of the entries in the details view the full results will be shown on the bottom right of the Object Dictionary window and allow the details to be edited (where allowed)

Object Details view

Object details editor

  • The object details view shows and allows editing of all the details of the index or subindex.

  • You may not change object type, if this is required please delete and readd a new object.

  • As per the discussion in the previous section not all fields may be changed on subobjects. Some require changing on the parent object.

Name - this is the name of the object or subobject. This will also be used to generate the name in the CO_OD.c/h file if you use the CanOpenNode exporter

Description - This is a free text field that is an extension of the CanOpen EDS specification. There is no limit on the text that can be used here. Any text entered will also be printed on the Documentation report for each object.

Object type - Simply shows the type of object VAR/ARRAY or REC cannot be modified

Data Type - Shows the currently configured data type. Can be changed for VAR objects, REC sub objects or ARRAY parent objects. All array items except subindex 0 have identical data types.

Access type - This configures the allowed access types as per CanOpen specification. Although it supports many types here not all will export correctly to CanOpenNode. The most common types are :-

rw - read write ro - read only 0x1003 - ro/rw - Special permissions as required by object 0x1003

The other options although they will export to eds have no real meaning with CanOpenNode

Memory type - CanOpenNode specific. This specifies where in memory the object will be placed. Choices are

  • RAM
  • ROM
  • EEPROM

No checking/synchronising is done with the Access types as it would make sense to ensure that rw objects do not exist in ROM etc..

PDO Map - Is this object allowed to be used for PDO mapping choices are

  • no
  • optional

PDO COS - CanOpenNode specific. This option when combined with a mapped TX PDO that also uses a type 0x 0xFE or 0xFF will auto send when ever the value changes (subject to any inhibit limit)

Default value - The default value for the object. Some type checking is performed for basic sanity but i'm sure you can crash something with silly values here. In theory Binary, Octal, Hex or decimal are supported for integer number types, as well as floating point and strings for appropriate Data Type selection.

Enabled - If ticked this will allow this Object to be exported to EDS or CO_OD.c/h files and used in reports.

Once you make any changes press the save button to keep them. If you change any fields the save button will go red and you will be prompted if you try to change to another object with out saving.