ifm
System Manual
ecomat
mobile
SmartController (CR2500) V05
CAN in the ecomatmobile controller
Description of the CAN functions
81
8.6.12
Function CANx_ERRORHANDLER
x = number 1...n of the CAN interface (depending on the device,
→
data sheet)
Contained in the library:
ifm_CRnnnn_Vxxyyzz.LIB
Available for the following devices:
•
CabinetController: CR0301, CR0302, CR0303
•
ClassicController: CR0020, CR0505
•
ExtendedController:
CR0200
•
PCB controller: CS0015
•
SafetyController: CR7020, CR7021, CR7200, CR7201, CR7505, CR7506
•
SmartController:
CR2500
Function symbol:
CAN1_ERRORHANDLER
BUSOFF_RECOVER
CAN_RESTART
CAN2_ERRORHANDLER
BUSOFF_RECOVER
Description
Error routine for monitoring the CAN interfaces
The function CANx_ERRORHANDLER monitors the CAN interfaces and evaluates the CAN errors. If
a certain number of transmission errors occurs, the CAN participant becomes error passive. If the
error frequency decreases, the participant becomes error active again (= normal condition).
If a participant already is error passive and still transmission errors occur, it is disconnected from the
bus (= bus off) and the error bit CANx_BUSOFF is set. Returning to the bus is only possible if the "bus
off" condition has been removed (signal BUSOFF_RECOVER).
The function input CAN_RESTART is used for rectifying other CAN errors. The CAN interface is
reinitialised.
Afterwards, the error bit must be reset in the application program.
The procedures for the restart of the interfaces are different:
•
For CAN interface 1 or devices with only one CAN interface:
set the input CAN_RESTART = TRUE (only 1 cycle)
•
For CAN interface 2:
set the input START = TRUE (only 1 cycle) in the function CAN2 (
→