Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN ID filter

Hi

 

I have an application with NI-CAN and I am using the card NI USB-8473

 

I want to filter incoming messages to read only certain ID extended (29 bits)

my required id is: 18DA8AF9 or 38DA8AF9

some of the other ID I receive are 38FF058A and 3CFF6FA5

 

I already saw the example about FilterModes but it is really not clear to me what values I should introduce in the comparator and Mask values

 

I only want to filter 1 ID so I guess the mode I need to use is extended single

 

Any help is appreciated

0 Kudos
Message 1 of 4
(2,996 Views)

Check out this post here as it references a built in shipping example to help calculate the correct mask values.

 

Check out this post for another example on how to accept a single frame.

 

 

Jeff L
National Instruments
0 Kudos
Message 2 of 4
(2,972 Views)

I am checking it today, thanks

0 Kudos
Message 3 of 4
(2,958 Views)

I downloaded the example for single frame, it gave me some values to use as input for the comparator and mask values and, it worked!

 

but, I still dont understand how those values are calculated, for now I will leave thema s constants since my required ID is not expected to change.

 

Thanks

0 Kudos
Message 4 of 4
(2,951 Views)