ifm
System Manual
ecomat
mobile
SmartController (CR2500) V05
CAN in the ecomatmobile controller
ifm CANopen library
85
8.7.2
CANopen master
Differentiation from other CANopen libraries
The CANopen library implemented by 3S (Smart Software Solutions) differentiates from the systems
on the market in various points. It was not developed to make other libraries of renowned
manufacturers unnecessary but was deliberately optimised for use with the CoDeSys programming
and runtime system.
The libraries are based on the specifications of CiA DS301, V402.
For users the advantages of the CoDeSys CANopen library are as follows:
•
Implementation is independent of the target system and can therefore be directly used on every
controller programmable with CoDeSys.
•
The complete system contains the CANopen configurator and integration in the development
system.
•
The CANopen functionality is reloadable. This means that the CANopen functions can be loaded
and updated without changing the operating system.
•
The resources of the target system are used carefully. Memory is allocated depending on the used
configuration, not for a maximum configuration.
•
Automatic updating of the inputs and outputs without additional measures.
The following functions defined in CANopen are at present supported by the
ifm
CANopen library:
•
Transmitting PDOs:
master transmits to slaves (slave = node, device)
Transmitting event-controlled (i.e. in case of a change), time-controlled (RepeatTimer) or as
synchronous PDOs, i.e. always when a SYNC was transmitted by the master. An external SYNC
source can also be used to initiate transmission of synchronous PDOs.
•
Receiving PDOs:
master receives from slave
Depending on the slave: event-controlled, request-controlled, acyclic and cyclic.
•
PDO mapping
Assignment between a local object directory and PDOs from/to the CAN device (if supported by
the slave).
•
Transmitting and receiving SDOs
(unsegmented, i.e. 4 bytes per entry in the object directory)
Automatic configuration of all slaves via SDOs at the system start.
Application-controlled transmission and reception of SDOs to/from configured slaves.
•
Synchronisation
Automatic transmission of SYNC messages by the CANopen master.
•
Nodeguarding
Automatic transmission of guarding messages and lifetime monitoring for every slave configured
accordingly.
We recommend: It is better to work with the heartbeat function for current devices since then the
bus load is lower.
•
Heartbeat
Automatic transmission and monitoring of heartbeat messages.
•
Emergency
Reception of emergency messages from the configured slaves and message storage.
•
Set
Node-ID
and
baud rate
in the slaves
By calling a simple function, node ID and baud rate of a slave can be set at runtime of the
application.