MicroCANopen V3.30 |
|
||
The changes made for version 3.30 of MicroCANopen are:
MicroCANopen ExampleThe example code for version MicroCANopen 3.30 was written to be compatible with the CANopen device profile DS401 for generic I/O devices. It uses files auto-generated by CANopen Architect EDS. Variable DefinitionsTo allow for an easy address method of variables located in the process image, #define statements are to specify offsets to the location of single variables. The can be auto-generated and are stored in pimg.h: // mapping entries for RPDO1 [1400] // mapping entries for RPDO2 [1401] // mapping entries for TPDO1 [1800] // mapping entries for TPDO2 [1801]
It must be ensured that all variables that go into one PDO (a single CAN message with process data) are located consecutively in the process image! Numerical values with multiple bytes (word, long) must be stored in the process image in "Little Endian" format (least significant byte first). |
|
||
MicroCANopen Example Application Code PiecesInitializationThe initialization sequence for the example is implemented within the user call-back function MCOUSER_ResetCommunication() in module user_xxx.c. The auto-generated version looks like this: #define INITPDOS_CALLS \ The parameters for the TPDOs are PDO Number, CAN ID (0 for default), event time, inhibit time, length in bytes, offset in process image. Main Loop//
background loop |
San Jose, CA |