Image Processing Reference
In-Depth Information
commands are definitely time-critical, and hence they use the highest-priority frames available in
CAN (i.e., CAN-ID is set to ).
The way the NMT state machine is actually coupled to the state machine concerning applica-
tion task(s) depends on the specific device taken into account, and falls in the scope of device
profiles.
15.6.6.2 Error Control Services
Error control services are used to detect possible failures in CANopen, by monitoring the correct
operation of the network. Two mechanisms are available, that is node guarding and heartbeat. In
both cases, low-priority messages are exchanged periodically in background over the network by the
different nodes and suitable watchdogs are defined, both in the NMT master and the NMT slaves.
Should one device cease sending these messages, after a given amount of time the NMT layer is made
awareoftheproblemandcantaketheappropriateactions.
he main difference between the two mechanisms is that in the node guarding protocol the NMT
master queries explicitly NMT slaves by means of guarding requests (implemented as remote frames).
If a slave does not respond within a predefined time (lifetime) or the state of the slave has changed
unexpectedly, the master application is notified. In this case, life guarding can be supported as well
(i.e., slave devices guard the correct behavior of the NMT master).
The heartbeat protocol, instead, foresees that heartbeat messages are produced autonomously and
periodically by devices, that can be monitored by other nodes in the network. If one of such heart-
beat consumers does not hear an heartbeat message from a heartbeat produced within a given time
(heartbeat consumer time), the local application is notified.
Messages sent by these two protocols are very similar, and basically encode the NMT state of
the transmitting device in  byte. The same kind of messages is also used by the boot-up proto-
col,whichisusedbyslavedevicestonotifythattheyhaveenteredtheNMTpreoperationalstate
after initialization. It is worth noting that the implementation of either guarding or heartbeat is
mandatory.
15.6.6.3 Predefined Connection Set
In order to reduce the efforts involved in setting up a CANopen system, a default allocation scheme
is provided that maps COBs of the different devices directly onto CAN identifiers. Such an allocation
is made available just after initialization (provided that no modifications have been stored in the
nonvolatile memory of the device). In many cases, such a scheme is adequate, e.g., when simple
applications are taken into account, that consist of a single application master controlling several
slave devices.
Accordingtothepredeinedallocationscheme,theCAN-IDismadeupoftwosubields:thefunc-
tion code (FC), which takes the four most significant bits of the identifier, and the node-ID that is
encoded on the seven least significant bits, as shown in Figure .. The FC basically encodes the
type of COB (PDO, SDO, EMCY, NMT, etc.), and most affects the resulting priority of the frame.
The node-ID, instead, besides providing a node addressing scheme, ensures that no two devices in
the network can send a frame with the same identifier (which could lead to unsolvable collisions on
the bus).
SomeoftheCOBsinthepredeinedconnectionset,suchasNMT,SYNC,andTIMEaremeant
to be sent to all devices (broadcast). he related CAN-IDs can be easily singled out, as the node-ID
field is set to . In general, it is worth noting that the particular format chosen for identifiers makes
theconigurationoftheilteringmasksonCANcontrollerseasier.
Concerning frames for peer-to peer communications, the scheme basically provides each slave
device with (up to) four TPDOs and (up to) four RPDOs for sending/receiving real-time process data,
one EMCY object for asynchronous alarm notification, one SDO to access the OD (in the form of a
 
Search WWH ::




Custom Search