CANopen Slave Documentation
Version 6.16.04
|
During initialization of the PDO module the function CosPdoComSetup() is called. Within this function, any default PDO communication parameter can be modified by the application.
For that purpose, the application has access to the structure CosPdoCom_s for Receive PDOs (atsRcvPdoComG
[]) and Transmit PDOs (atsTrmPdoComG
).
The transmission type is modified the setting the element CosPdoCom_s::ubTransType with a value from the enumeration PdoType_e.
In order to use the event timer, the transmission type of the PDO must have a value > 253 (i.e. ePDO_TYPE_EVENT_MANUFACTURER or ePDO_TYPE_EVENT_PROFILE).
All timer values are internally converted into timer ticks, hence a required time must be converted into tick value by means of CosTmrCalcTicks(). The following example shows how to configure Transmit PDO 1 with an event timer value of 100 ms.