ifm
System Manual
ecomat
mobile
SmartController (CR2500, CR2502) V05
CAN in the ecomatmobile controller
ifm CANopen library
107
Access to the CAN device at runtime
Setting of the node numbers and the baud rate of a CAN device
For the CAN device the node number and the baud rate can be set at runtime of the application
program.
►
For setting the
node number
the function CANx_SLAVE_NODEID (
→
page
) of the library
ifm_CRnnnn_CANopenSlave_Vxxyyzz.lib
is used.
►
For setting the
baud rate
the function CAN1_BAUDRATE (
→
) or the function CAN1_EXT
(
→
page
) or the function CANx of the corresponding device library is used for the controllers
and the PDM360 smart. For PDM360 or PDM360 compact the function
CANx_SLAVE_BAUDRATE is available via the library
ifm_CRnnnn_CANopenSlave_Vxxyyzz.lib
.
Access to the OD entries by the application program
As standard, there are entries in the object directory which are mapped to variables (parameter
manager).
However, there are also automatically generated entries of the CAN device which cannot be mapped
to the contents of a variable via the parameter manager. Via the function CANx_SLAVE_STATUS
(
→
page
) these entries are available in the library
ifm_CRnnnn_CANopenSlave_Vxxyyzz.LIB
.
Change the PDO properties at runtime
If the properties of a PDO are to be changed at runtime, this is done by another node via SDO write
access as described by CANopen.
As an alternative, it is possible to directly write a new property, e.g. the "event time" of a send PDO
and then transmit a command "StartNode-NMT" to the node although it has already been started. As a
result of this the device reinterprets the values in the object directory.
Transmit emergency messages via the application program
To transmit an emergency message via the application program the function
CANx_SLAVE_EMCY_HANDLER (
→
page
) and the function
CANx_SLAVE_SEND_EMERGENCY (
→
) can be used. The library
ifm_CRnnnn_CANopenSlave_Vxxyyzz.LIB
provides these functions.
Summary of Contents for Ecomat 100 ecomatmobile SmartController CR2500
Page 1: ...System Manual SmartController CR2500 CR2502 CoDeSys V2 3 Target V05 7390667 00 03 2009 ...
Page 6: ......
Page 282: ......