70
ifm
Programming Manual
ecomatmobile
CabinetController (CR0301) Runtime System V05
2016-04-21
ifm function elements
ifm function elements for the device CR0301
>
CANx_ERRORHANDLER
9344
x = 1...n = number of the CAN interface (depending on the device,
→ Data sheet)
Unit type = function block (FB)
Unit is contained in the library
ifm_CR0301_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
636
Error routine for monitoring the CAN interfaces
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 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
CAN2
NOTE
In principle, CAN2 must be executed to initialise the second CAN interface, before FBs can be used
for it.
If the automatic bus recover function is to be used (default setting) CANx_ERRORHANDLER must
not
be integrated and instanced in the program!
>
Parameters of the inputs
637
Parameter
Data type
Description
BUSOFF_RECOVER
BOOL
TRUE (only 1 cycle):
> remedy 'bus off' status
> reboot of the CAN interfacex
FALSE:
function element is not executed
CAN_RESTART
BOOL
TRUE (only 1 cycle):
completely reinitialise CAN interface
FALSE:
function element is not executed
Summary of Contents for Ecomat 100 Mobile CR0301
Page 212: ......