76
ifm
System Manual
ecomat
mobile
SmartController (CR2500) V05
CAN in the ecomatmobile controller
Description of the CAN functions
8.6.10
Function CANx_RECEIVE_RANGE
x = number 1...n of the CAN interface (depending on the device,
→
data sheet)
Contained in the library:
from ifm_CRnnnn_V05yyzz.LIB
Available for:
•
CabinetController: CR0301, CR0302, CR0303
•
ClassicController: CR0020, CR0505
•
ExtendedController:
CR0200
•
SafetyController: CR7020, CR7021, CR7200, CR7201, CR7505, CR7506
Function NOT for safety signals!
(For safety signals
→
function CAN_SAFETY_RECEIVE)
•
PCB controller: CS0015
•
SmartController:
CR2500
•
PDM360 smart: CR1070, CR1071
Function symbol:
CANx_RECEIVE_RANGE
CONFIG
ID
CLEAR
DATA
FIRST_ID
DLC
LAST_ID
AVAILABLE
OVERFLOW
Description
CANx_RECEIVE_RANGE configures a sequence of data receive objects and reads the receive buffer
of the data objects.
For the first CAN interface max. 2048 IDs per bit are possible.
For the second CAN interface max. 256 IDs per 11 OR 29 bits are possible.
The second CAN interface requires a long initialisation time. To ensure that the watchdog does not
react, the process should be distributed to several cycles in the case of bigger ranges.
→
Example
(
→
page
The function must be called once for each sequence of data objects during initialisation to inform the
CAN controller about the identifiers of the data objects.
The function must NOT be mixed with function CANx_RECEIVE (
→
) or function
CANx_RECEIVE_RANGE for the same IDs at the same CAN interfaces.
In the further program cycle CANx_RECEIVE_RANGE is called for reading the corresponding receive
buffer, also repeatedly in case of long program cycles. The programmer has to ensure by evaluating
the byte AVAILABLE that newly received data objects are retrieved from buffer SOFORT and are
further processed as the data are only available for one cycle.
Each call of the function decrements the byte AVAILABLE by 1. If the value of AVAILABLE is 0, there
is no data in the buffer.