Structure view

The Structure view provides the direct access to the attributes of the object. The Main-Index view includes the attributes which are valid for all sub-indices of the object. The Sub-Index view includes the attributes which are valid for the selected sub-index of the object.

All attributes of Data Type objects specified in the communication standard are fixed. For manufacturer-specific and device profile-specific Data Type objects only the relevant attributes are configurable. The disabled attributes can be specified for each Segment object of this data type individually. Segment object means an object in the Communication Segment, Manufacturer Segment or Device Profile Segment.


Main-Index

Element Description
line-dependent This option is only available for multi-line designs and for objects in the main-index range 2000h - 9FFFh. It specifies the generation of a prefix for the C Name, see multi-line prefix.
EDS Name This entry names the main-index in the EDS file and in the documentation. %-Variables can be used here.
Data Type This entry specifies the data type of the main-index.
Object Code This entry specifies the object code (= object type) of the main-index.
C Name This entry specifies the name of the data type or variable in C code. This name must be given in C syntax.
For multi-line devices the name may have a multi-line prefix.
%-Variables (like %i,%f etc.) can be used here.
C Callback This entry specifies the name of an application-specific callback function, which is called when the object shall be read or written. Object-specific callbacks are available for CAN Library V4.5 and higher. This feature must be selected about General Settings / General Object Settings / Enable object-specific callback functions.
The application-specific callback function has to use the following function prototype:
     RET_T <C Callback name> (UNSIGNED16 index, UNSIGNED8 sub, CO_OBJ_CB_TYPE_T reason, CO_COMMA_LINE_DECL);
Description The description will be inserted in the documentation to describe the object.


Sub-Index

Element Description
PDO Mapping This checkbutton has to be checked in order to allow the mapping of the sub-index into a PDO.
Nonvolatile Storage This checkbutton registers the object for nonvolatile storage. This property is supported by the CANopen Library V4.5 and higher.
EDS Name only for Communication, Manufacturer, Device Profile and Dynamic Variables Segment :
This entry names the sub-index in the EDS file and in the documentation. %-Variables can be used here.
C Name only for Data Types:
This entry specifies the name of the RECORD element used in C code. This name must be given in C syntax.
Data Type This entry specifies the data type of the sub-index.
Size This entry specifies the size of the sub-index in bytes.
Size has to include the string terminator byte for objects of data type VISIBLE_STRING or OCTET_STRING.
All elements of arrays of data type VISIBLE_STRING, OCTET_STRING and DOMAIN have to have the same size. It can be necessary to set the size manually after changing the data type or import.
Unit This entry specifies the unit of the sub-index for documentation.
Access This entry specifies the access right of the sub-index.
If PDO Mapping is allowed, use the following access rights instead of Read Write:
  • Read Write Read (RWR): sub-index is RW via SDO and R via PDO
  • Read Write Write (RWW): subindex is RW via SDO and W via PDO
Lower Limit This entry specifies the minimum of the sub-index.
Default Value This entry specifies the initialization value of the sub-index.
Upper Limit This entry specifies the maximum of the sub-index.
h/d - button This button toggles between the hexa-decimal and the decimal presentation of Lower Limit, Default Value and Upper Limit.
Default Value in EDS file This option determines if the Default Value is documented in the EDS file. The documentation is optional according to CiA-306-1. In many cases it is well to deactivate the documentation for sub-indices with the access right Read Only.
Limits in EDS file This option determines if the Limits are documented in the EDS file. The documentation is optional according to CiA-306-1. Note the global setting about the menu Options / Generation Options / Enable limits in EDS.
Refuse read on scan
(ObjFlags)
This option determines the behavior of a configuration tool. The configuration tool must not read the sub-index during scan, if the option is set.
Refuse write on download
(ObjFlags)
This option determines the behavior of a configuration tool. The configuration tool must not write the sub-index during download, if the option is set.
Valid after reset
(ObjFlags)
This option determines the behavior of a configuration tool and means:
  • option set: change of sub-index takes effect immediately
  • option reset: change of sub-index takes effect after reset
Reset - button This button resets the attributes to the previous values.
Default Values - button This button resets the attributes to their default values.

Objects of Object Code "Array" are specified C-like, i.e. sub-index 0 has the data type of the array instead of UNSIGNED8 and Size represents the size of the array data type. The conversion to data type UNSIGNED8 is made during generation if it is necessary. But the default value and the limit values shall be set to values of UNSIGNED8, e.g. Lower Limit = 1 and Upper Limit = 254. For arrays of data type REAL32 the values of sub-index 0 shall be given as float value, e.g. Lower Limit = 1.0, Defaul Value = 2.0 and Upper Limit = 254.0.


Multi-line

The C Names in multi-line designs may have line-dependent prefixes l<line>_, example: l0_ for line 0.

For objects in the Communication Segment the prefix is prepended automatically as these objects can not be the same in more than one line.
For objects in the Manufacturer Segment, the Device Profile Segment and in the Dynamic Variables Segment the generation of the prefix can be suppressed by deactivation of object main-index / tab Structure Main-Index /line-dependent.

If the same C variable shall be used on more lines, the C variable has to be created only once on one line.
On the "source" line activate the generation of the C variable by:

On all other "destination" lines deactivate the generation of the C variable by:

C variables in multi-line designs have own value description structures, because they may have different limits and access types.


Copyright
port GmbH