
I-7540D CAN-Ethernet Gateway User’s Manual (Version 1.8, March/2021)
36
3.1.4 How to set the Acceptance Code and Mask
Acceptance Code (AccCode): The CAN ID bits that you want to get.
Acceptance Mask (AccMask): The CAN ID bits that you want to filter.
The AccCode is used for deciding what kind of ID the CAN controller will accept.
The AccMask is used for deciding which bit of ID will need to check with AccCode.
If the bit of AccMask is set to 0, it means that the bit in the same position of ID
need to be checked, and that ID bit value needs to match the bit of AccCode in the
same position.
For 11-bit ID Message:
AccCode and AccMask
Bit Position
Filter Target
AccCode[0] and AccMask[0]
bit7~bit0
bit10 ~ bit3 of ID
AccCode[1] and AccMask[1]
bit7~bit5
bit2 ~ bit0 of ID
AccCode[1] and AccMask[1]
bit4
RTR
AccCode[1] and AccMask[1]
bit3~bit0
no use
AccCode[2] and AccMask[2]
bit7~bit0
bit7 ~ bit0 of 1st byte data
AccCode[3] and AccMask[3]
bit7~bit0
bit7 ~ bit0 of 2nd byte data
For 29-bit ID Message:
AccCode and AccMask
Bit Position
Filter Target
AccCode[0] and AccMask[0]
bit7~bit0
bit28~ bit21 of ID
AccCode[1] and AccMask[1]
bit7~bit0
bit20 ~ bit13 of ID
AccCode[2] and AccMask[2]
bit7~bit0
bit12 ~ bit5 of ID
AccCode[3] and AccMask[3]
bit7~bit3
bit4 ~ bit0 of ID
AccCode[3] and AccMask[3]
bit2
RTR
AccCode[3] and AccMask[3]
bit1~bit0
no use