68
ifm
Programming Manual BasicController relay CR0431 v03.03.00
05 / 2018
ifm function elements
ifm function elements for the device CR0431
CAN_RX_ENH
7606
= CAN RX enhanced
Unit type = function block (FB)
Unit is contained in the library
ifm_RawCAN_NT_Vxxyyzz.LIB
Symbol in CODESYS:
>
Description
7608
In addition, CAN_RX_ENH provides the following possibilities (as opposed to
CAN_RX
(
• select the frame type (11 or 29 bits),
• define a mask for the evaluation of the CAN ID.
Bit comparison of
ID and mask:
If ID_MASK-Bit = 0, then CAN-ID-Bit may be = 0 or 1.
If ID_MASK-Bit = 1, then CAN-ID-Bit must be = ID-Bit.
With the mask several identifiers can be defined as filters.
Example:
ID = 0x100 = 0b0001 0000 0000
ID_MASK = 0x1F1 = 0b0001 1111 0001
Result
The CAN IDs with the following bit pattern are evaluated:
0bxxx1 0000 xxx0 (x = any), i.e. for this example (all in [hex]):
100, 102, 104, 106, 108, 10A, 10C, 10E,
300, 302, 304, 306, 308, 30A, 30C, 30E,
500, 502, 504, 506, 508, 50A, 50C, 50E,
700, 702, 704, 706, 708, 70A, 70C, 70E
>
Parameters of the inputs
7609
Parameter
Data type
Description
ENABLE
BOOL
TRUE:
execute this function element
FALSE:
unit is not executed
> Function block inputs are not active
> Function block outputs are not specified
CHANNEL
BYTE
CAN interface (1...n) depending on the device
ID
DWORD
Number of the data object identifier:
normal frame (2
11
IDs):
0...2 047 = 0x0000 0000...0x0000 07FF
extended Frame (2
29
IDs):
0...536 870 911 = 0x0000 0000...0x1FFF FFFF
Extended
(optional use of the parameter)
BOOL := FALSE
TRUE:
extended Frame (ID = 0...2
29
-1)
FALSE:
normal Frame (ID = 0...2
11
-1)
ID_Mask
(optional use of the parameter)
DWORD := 0
filter mask for the identifier:
if ID_MASK bit = 0, CAN ID bit may be = 0 or 1
if ID_MASK bit = 1, CAN ID bit must be = ID bit
Summary of Contents for ioControl CR2050
Page 228: ...228 10 Notizen Notes Notes ...