Appendix R – CANopen Import/Export description template specifiers and variables

Appendix R – CANopen Import/Export description template specifiers and variables

specifier name

category

description

${index.address}

description:

numerical number of the main-index.

category:

mandatory

value range:

0x0040 - 0xAFFF

${index.dataType.address}

description:

numerical value of the data type according to /CiA-301/.

category:

mandatory

value range:

0x0001 - 0x025F

${index.CName}

description:

name of the complex data type or of the variable in the generated C code. If no name is specified the name is generated by the Communication Creator as follow:

  1. The Object name (${index.name}) is used if it is specified with adjustments to C syntax.

  2. If no name is specified the Communication Creator builds own names:

·         for data types:

DATATYPE_<index>_T, example: DATATYPE_0040_T

·         for variables: obj_<index>, example: obj_2000

category:

optional

value range:

String with C-syntax

${index.name}

description:

name of the object for the documentation in the EDS/XDD file. If no name is specified the Communication Creator uses the C name, see csv-specifier ${index.CName}.

category:

optional

value range:

String

${index.objectCode}

description:

numerical value of the object code according to /CiA-301/.

Variable value is one of the following:

  • CO_VARIABLE

  • CO_ARRAY

  • CO_RECORD

  • CO_DOMAIN

  • CO_DEFTYPE

  • CO_DEFSTRUCT

category:

mandatory

value range:

0x06 for DEFSTRUCT

0x07 for VAR

0x08 for ARRAY

0x09 for RECORD

${index.CCallback}

description:

name of the C callback function.

 

condition: callback functions must be enabled (see GUI Project Settings > Objects > Enable object-specific callback functions

category:

optional

value range:

String with C-syntax

${index.description}

description:

documentation of the object.

category:

optional

value range:

String

${index.constantDefault}

description:

memory area that shall be used to store the default value of the object in C code.

category:

optional

value range:

0 - stored in RAM

1- stored in program memory

 

Default: 1

${index.constantLimits}

description:

memory area that shall be used to store the limits of the object in C code.

category:

optional

value range:

0 - stored in RAM

1- stored in program memory

 

Default: 1

${index.createExtern}

description:

defines if an external declaration shall be generated.

category:

optional

value range:

0 - extern declaration is not generated

1- extern declaration is generated

 

Default: 1

${index.createTypedef}

description:

defines if the C struct for a complex data type shall be generated in C code.

category:

optional

value range:

0 - data type struct is not generated

1- data type struct is generated

 

Default: 1

${index.createVariable}

description:

defines if the variable shall be generated in C code. (not applicable for data types)

 

condition: this attribute must be local changeable (see GUI Line > Standard Settings > Create variable > local changeable

category:

optional

value range:

0 - variable is not generated

1- variable is generated

 

Default: 1

${index.storageClass}

description:

compiler specific memory specifier keyword, e.g. xdata.

 

condition: this attribute must be local changeable (see GUI Line > Standard Settings > Storage class > local changeable

category:

optional

value range:

<compiler specific string>

${index.virtualObject}

description:

defines if the object shall be interpreted as virtual or normal object.

 

condition: this attribute must be local changeable (see GUI Line > Standard Settings > Virtual object > local changeable

category:

optional

value range:

0 - normal object

1- virtual object

 

Default: 0

${index.sameStructure}

description:

defines if the object sub- indices bigger than 1 shall have the same structure like sub 1 of the main-index.

 

condition: this attribute must be local changeable (see GUI Line > Standard Settings > Same structure for subs > local changeable

category:

optional

value range:

0 - normal object

1- same structure for subs of object

 

Default: 0

${index.constantDescription}

description:

memory area that shall be used to store the description of the object in C code, see /Library manual/.

 

condition: this attribute must be local changeable (see GUI Line > Standard Settings > Constant description structure > local changeable

category:

optional

value range:

0 - stored in RAM

1- stored in program memory

 

Default: 1

${index.CCompilerDefine}

description:

compiler-define in C-syntax for the index number of the object in hexadecimal format.

category:

optional

value range:

String with C-syntax

${index.generateEDSXDDEntry}

description:

defines if the object is excluded from EDS/XDD generation

category:

optional

value range:

0 - object is not generated in EDS/XDD

1 - object is not generated in EDS/XDD

 

Default: 1

${index.generateDocEntry}

description:

defines if the object is excluded from exported documents generation

category:

optional

value range:

0 - object is not generated in exported documents

1 - object is not generated in exported documents

 

Default: 1

${index.linedependent}

description:

specifies generation of a prefix for the CName (only applicable for multi-line designs and objects with range: 0x2000 - 0xAFFF

category:

optional

value range:

0 - not linedependent

1 - linedependent

${subindex.address}

description:

numerical number of the sub-index.

category:

mandatory

value range:

0 - 255

${subindex.dataType.address}

description:

numerical value of the data type of the sub-index according to /CiA-301/.

category:

mandatory

value range:

0x0001 - 0x001B

${subindex.name}

description:

name of the sub-index in the EDS/XDD file and in the documentation. If no name is specified the name is generated by the Communication Creator as follow:

  1. for object code VAR: The name of the main-index is used, see ${index.name}.

for object Code ARRAY or RECORD: The name is generated: sub_<sub>, example: sub_0C. <sub> is a hexadecimal number with 2 digits.

category:

optional

value range:

String

${subindex.CName}

description:

name of the sub-index used in the generated C code for the element of complex data types. If no name is specified the name is generated by the Communication Creator as follow:

  1. for object code VAR: The C name of the main-index is used, see ${index.CName}.

  1. for object Code ARRAY or RECORD: The name is generated: sub_<sub>, example: sub_0C. <sub> is a hexadecimal number with 2 digits.

category:

optional

value range:

String with C-syntax

${subindex.size}

description:

size of the sub-index. This csv-specifier is relevant for extended data types, e.g.

VISIBLE_STRINGs.

category:

optional

value range:

depends on data type

${subindex.unit}

description:

unit of the object.

category:

optional

value range:

String

${subindex.sdoAccess}

description:

SDO access right of the sub-index.

Variable value is one of the following:

  • CO_READONLY

  • CO_CONSTANT

  • CO_READWRITE

  • CO_WRITEONLY

category:

optional

value range:

RO, RW, WO, CONST

 

Default: RO

${subindex.lowerLimit}

description:

lower limit of numerical objects.

category:

optional

value range:

range of numerical data type

${subindex.upperLimit}

description:

upper limit of numerical objects.

category:

optional

value range:

range of numerical data type

${subindex.defaultValue}

description:

value of the object.

category:

optional

value range:

depends on data type

${subindex.pdoAccess}

description:

PDO access right of the sub-index.

Variable value is one of the following:

  • CO_NO_PDO

  • CO_TPDO

  • CO_RPDO

  • CO_TPDORPDO

category:

optional

value range:

no - PDO mapping is not allowed

 r – only mappable via RPDO

 t – only mappable via TPDO

tr – mappable in RPDO and TPDO

 

Default: no

${subindex.nonVolatileStorage}

description:

usage of the mechanism for nonvolatile storage of the CANopen Library V4.5 and higher.

 

condition: this attribute must be local changeable (see GUI Line > Standard Settings > Nonvolatile storage > local changeable

category:

optional

value range:

0 - nonvolatile storage not supported by Library

1 - nonvolatile storage supported by Library

 

Default: 0

${subindex.refuseRead}

description:

objFlag / Read (bit 1), see /CiA-306-1/ and /CiA-311/. This flag allows the reading on upload or not.

category:

optional

value range:

0 - read on upload is allowed

1 - read on upload is not allowed

${subindex.refuseWrite}

description:

objFlag

/ Write (bit 0), see /CiA-306-1/ and /CiA-311/. This flag allows the writing on download or not.

category:

optional

value range:

0 - write on download is allowed

1 - write on download is not allowed

 

Default: 0

${subindex.validAfterReset}

description:

objFlag / after reset (bit 2), see /CiA-311/. This flag determines when changed values are be activated.

category:

optional

value range:

0 - change values are valid immediately

1 - change values are valid after reset

 

Default: 0

${subindex.limitsInEDSXDD}

description:

defines if the limit values shall be documented in the EDS and XDD files.

category:

optional

value range:

0 - EDS/XDD without limits

1 - EDS/XDD with limits

 

Default: 1

${subindex.defaultInEDSXDD}

description:

defines if the limit values shall be documented in the EDS and XDD files.

category:

optional

value range:

0 - EDS/XDD without limits

1 - EDS/XDD with limits

 

Default: 1

${subindex.CCompilerDefine}

description:

compiler-define with C-syntax for the sub-index number of an object in decimal format

category:

optional

value range:

String with C-syntax

${subindex.srdoAccess}

description:

SRDO access right of the sub-index.

Value is one of the following:

  • CO_NO_SRDO

  • CO_TX_SRDO

  • CO_RX_SRDO

  • CO_TXRX_SRDO

 

category:

optional

value range:

no - SRDO mapping is not allowed

 rx – only mappable via receive SRDO

 tx – only mappable via transmit SRDO

trx – mappable via transmit and receive SRDO

 

Default: no

 

The following specifiers are not applicable for csv-import

 

${objectFlags}

description:

numerical value that consists of the following object flags:

 

bit 0: refuse write on download

bit 1: refuse read on scan

bit 2: valid after reset

category:

optional

value range:

0 - 7

 

Default: 0

${subsegment.address}

description:

numerical number of the sub-segment.

category:

mandatory

value range:

0x2000 - 0x9FFF

${subsegment.CName}

description:

name of the variable in the generated C code. If no name is specified the name is generated by the Communication Creator as follow:

  1. The subsegment name (${subsegment.name}) is

used if it is specified with adjustments to C syntax.

  1. If no name is specified the Communication Creator builds own names:

subseg_<subsegment>, example: subseg_2000

category:

optional

value range:

String with C-syntax

${subsegment.name}

description:

name of the object for the documentation in the EDS/XDD file. If no name is specified the Communication Creator uses the C name, see specifier ${subsegment.CName}.

category:

optional

value range:

String

${subsegment.startIndex}

description:

numerical number of the lower limit of the index range that this subsegment can contain. (has to be the same value like ${subsegment.address})

category:

optional

value range:

0x2000 - 0x9FFF

${subsegment.endIndex}

description:

numerical number of the upper limit of the index range that this subsegment can contain.

category:

mandatory

value range:

0x2000 - 0x9FFF

${subsegment.constantDescription}

description:

memory area that shall be used to store the description of the sub-segment in C code, see /Library manual/.

category:

optional

value range:

0 - stored in RAM

1- stored in program memory

 

Default: 0

${subsegment.virtualObject}

description:

defines if the sub-segment shall be interpreted as virtual or normal sub-segment (see chapter 11.9 à sub-segmentation).

category:

optional

value range:

0 - normal sub-segment

1- virtual sub-segment

 

Default: 0

Table 42: Specifiers for import/export description templates

name in code

type

description

${subsegment.contents}