3
ifm System Manual ecomatmobile SmartController (CR2500) V05
Contents
7 Programming and system resources 42
7.1 Above-average stress .....................................................................................................42
7.2 Limits of the SmartController...........................................................................................43
7.3 Watchdog behaviour .......................................................................................................44
7.4 Available memory............................................................................................................44
7.5 Program creation and download in the PLC ...................................................................45
8 CAN in the ecomatmobile controller 47
8.1 General about CAN .........................................................................................................47
8.1.1 Topology .......................................................................................................47
8.1.2 CAN interfaces..............................................................................................48
8.1.3 System configuration.....................................................................................48
8.2 Exchange of CAN data....................................................................................................49
8.2.1 CAN-ID..........................................................................................................49
8.2.2 Data reception...............................................................................................50
8.2.3 Data transmission .........................................................................................50
8.3 Physical connection of CAN ............................................................................................51
8.3.1 Network structure ..........................................................................................51
8.3.2 Bus level........................................................................................................52
8.3.3 Bus cable length............................................................................................53
8.3.4 Wire cross-sections.......................................................................................54
8.4 Software for CAN and CANopen.....................................................................................55
8.5 CAN errors and error handling ........................................................................................55
8.5.1 Error message...............................................................................................55
8.5.2 Error counter .................................................................................................56
8.5.3 Participant, error active .................................................................................56
8.5.4 Participant, error passive ..............................................................................56
8.5.5 Participant, bus off ........................................................................................57
8.6 Description of the CAN functions ....................................................................................58
8.6.1 Function CAN1_BAUDRATE ........................................................................59
8.6.2 Function CAN1_DOWNLOADID...................................................................61
8.6.3 Function CAN1_EXT.....................................................................................63
8.6.4 Function CAN1_EXT_TRANSMIT ................................................................65
8.6.5 Function CAN1_EXT_RECEIVE...................................................................67
8.6.6 Function CAN1_EXT_ERRORHANDLER ....................................................69
8.6.7 Function CAN2..............................................................................................70
8.6.8 Function CANx_TRANSMIT .........................................................................72
8.6.9 Function CANx_RECEIVE ............................................................................74
8.6.10 Function CANx_RECEIVE_RANGE .............................................................76
8.6.11 Function CANx_EXT_RECEIVE_ALL...........................................................79
8.6.12 Function CANx_ERRORHANDLER..............................................................81
8.7 ifm CANopen library ........................................................................................................83
8.7.1 CANopen support by CoDeSys ....................................................................83
8.7.2 CANopen master...........................................................................................85
8.7.3 Start-up of the network without [Automatic startup] ......................................96
8.7.4 CAN device ................................................................................................ 100
8.7.5 CAN network variables............................................................................... 108
8.7.6 Information on the EMCY and error codes ................................................ 113
8.7.7 Library for the CANopen master ................................................................ 117
8.7.8 Library for the CANopen slave................................................................... 129
8.7.9 Further ifm libraries for CANopen .............................................................. 139
8.8 Summary CAN / CANopen........................................................................................... 144
8.9 Use of the CAN interfaces to SAE J1939..................................................................... 145
8.9.1 Function J1939_x....................................................................................... 148
8.9.2 Function J1939_x_RECEIVE..................................................................... 150