56
ifm
System Manual
ecomat
mobile
SmartController (CR2500) V05
CAN in the ecomatmobile controller
CAN errors and error handling
8.5.2
Error counter
A transmit and receive error counter are integrated in the CAN controller. They are counted up
(incremented) for every faulty transmit or receive operation. If a transmission was correct, these
counters are counted down (decremented).
However, the error counters are more incremented in case of an error than decremented in case of
success. Over a defined period this can lead to a considerable increase of the counts even if the
number of the undisturbed messages is greater than the number of the disturbed messages. Longer
undisturbed periods slowly reduce the counts. So the counts indicate the relative frequency of
disturbed messages.
If the participant itself is the first to detect errors (= self-inflicted errors), the error is more severely
"punished" for this participant than for other bus participants. To do so, the counter is incremented by
a higher amount.
If the count of a participant exceeds a defined value, it can be assumed that this participant is faulty.
To prevent this participant from disturbing bus communication by active error messages (error active),
it is switched to "error passive".
error
passive
error
active
bus off
REC > 127
or TEC > 127
REC < 128
and TEC < 128
TEC > 255
CAN Restart
CAN Neustart
REC = Receive error counter / Zähler Empfangsfehler
TEC = Transmit error counter / Zähler Sendefehler
Figure: mechanism of the error counter
error active
→
participant, error active (
→
page
)
error passive
→
participant, error passive (
→
page
bus off
→
participant, bus off (
→
page
)
CAN restart
→
participant, bus off (
→
page
)
8.5.3
Participant, error active
An error active participant participates in the bus communication without restriction and is allowed to
signal detected errors by transmitting the active error flag. As already described the transmitted
message is destroyed.
8.5.4
Participant, error passive
An error passive participant can also communicate without restriction. However, it is only allowed to
identify a detected error by a passive error flag, which does not interfere with the bus communication.
An error passive participant becomes error active again if it is below a defined count value.
To inform the user about incrementing of the error counter, the system variable CANx_WARNING is
set if the value of the error counter is > 96. In this state the participant is still error active.