24.08.2013 Views

CANopen Manager / Slave Manual - esd electronics, Inc.

CANopen Manager / Slave Manual - esd electronics, Inc.

CANopen Manager / Slave Manual - esd electronics, Inc.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PDO Mapping Tables<br />

<strong>CANopen</strong>-<strong>Slave</strong><br />

The following macros are used to define a default mapping of entries in the object dictionary to the<br />

PDO of the slave node. Their only purpose is to provide the possibility of a more clearly laid out code<br />

for the mapping data structure which is referenced in canOpenDefinePDO().<br />

BEGIN_MAPPING_TABLE(MappingName)<br />

Begins the definition of a PDO mapping table. You can define more than one PDO mapping<br />

defining different values for MappingName. You have to define the PDO mapping table either<br />

in the local scope of your source module or in the local scope of code that is implementing<br />

DECLARE_PDO.<br />

END_MAPPING_TABLE<br />

Ends the definition of a PDO mapping table.<br />

MAPPING_ENTRY(Index, Subindex)<br />

Defines a new mapping entry. Please refer to the documentation of the parameter Mapping for<br />

canOpenDefinePDO() for more details about the macro parameter Index and Subindex.<br />

Internally these macros define arrays of the type unsigned short with the variable name<br />

MappingName prefixed by the string “_Mapping_” which do not need accessed directly by the<br />

application. At the end of the explanation of the PDO Table related macros you will find an example<br />

using these macros.<br />

<strong>CANopen</strong> <strong>Slave</strong> Software <strong>Manual</strong> • Doc. No.: C.2002.21 / Rev. 2.2 Page 53 of 65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!