Application note 0564-04: Send Indications

This document is an amendment to the user manual of the CANopen Library from port.

 

In the CANopen Library 4.4.p77 there are two new indications introduced. The purpose for this indication is to signal to the application that message to send was given to the CANopen Library buffers. The Indication tells the application if it was successful, the CAN-line and CANopen service dependend information. To enable this this applications the following defines have to be set in the CANopen Designtool under Hardware Configuration/Advanced Configuration.

 

 

compiler define

Design Tool setting

CO_CONFIG_PDO_SEND_IND

Enables the send indication for transmit PDOs.

CO_CONFIG_SYNC_SEND_IND

Enables the send indication for a transmit sync.

 

 

If the application wants to use the indications, two callbacks have to be implemented.

For PDOs is the prototype:

 

void sendPdoInd(UNSIGNED16 pdoNr, UNSIGNED8 reason, RET_T returnCode CO_COMMA_LINE_PARA_DECL);

 

Parameter description:

parameter

description

pdoNr

Is the Number of the PDO which caused this callback.

reason

Is the reason for trying a send. The values are:

SEND_PDO_IND_RTR     

SEND_PDO_IND_TIME   

SEND_PDO_IND_SYNC     

SEND_PDO_IND_ACYC

returnCode

If this value is unequal to CO_OK the transmission to the CANopen Library buffer failed.

 

For SYNCs is the prototype:

 

void sendSyncInd(UNSIGNED8 syncCnt, RET_T returnCode  CO_COMMA_LINE_PARA_DECL);

 

Parameter description:

parameter

description

syncCnt

Is the sync counter value of this specific sync message.

returnCode

If this value is unequal to CO_OK the transmission to the CANopen Library buffer failed.