73
ifm
Programming Manual
ecomatmobile
CabinetController (CR0301) Runtime System V05
2016-04-21
ifm function elements
ifm function elements for the device CR0301
>
CANx_RECEIVE_RANGE
4179
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
(xx > 05)
Symbol in CODESYS:
>
Description
20914
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.
To ensure that the watchdog does not react, the process should be distributed to several cycles in the
case of bigger ranges(
→
Example: Initialisation of CANx_RECEIVE_RANGE in 4 cycles
(
The FB 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 FB must NOT be mixed with
CANx_RECEIVE
(
) or 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 FB decrements the byte AVAILABLE by 1. If the value of AVAILABLE is 0, there is no
data in the buffer.
By evaluating the output OVERFLOW, an overflow of the data buffer can be detected. If
OVERFLOW = TRUE, at least 1 data object has been lost.
Receive buffer: max. 16 software buffers per identifier.
>
Parameters of the inputs
20915
Parameter
Data type
Description
CONFIG
BOOL
TRUE (in the 1st cycle):
configure data object
FALSE:
during further processing of the program
CLEAR
BOOL
TRUE:
delete receive buffer
FALSE:
function element is not executed
FIRST_ID
WORD
Number of the first data object identifier of the sequence.
permissible values normal frame: 0...2 047 (2
11
)
permissible values extended frame: 0...536 870 911 (2
29
)
LAST_ID
WORD
Number of the last data object identifier of the sequence.
permissible values normal frame: 0...2 047 (2
11
)
permissible values extended frame: 0...536 870 911 (2
29
)
LAST_ID has to be higher than FIRST_ID.
Summary of Contents for Ecomat 100 Mobile CR0301
Page 212: ......