From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,652 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,628 Views)

I am checking it today, thanks

0 Kudos
Message 3 of 4
(2,614 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,607 Views)