Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

nican Arbitration ID filtering

hi,

need help on how to filter out Incoming Arbitration ID.
I only want to read Arb. ID ranging from 0x1030000 to 0x103FFFF. I'am using MVC++. I've tried to alter NC_ATTR_CAN_MASK_XTD (Extended Mask) into different values but i cant seem to filter the ID's out.
0 Kudos
Message 1 of 7
(7,057 Views)
You might want to check what the value of NC_ATTR_CAN_COMP_XTD is. If you are only using CAN objects to read, your value for this should be 0xCFFFFFFF(disabled), otherwise this value will also filter incoming frames using values in the comparator.

It has been awhile since I setup my filters, but I think you want to set the mask to 0x01030000, and the comparator to 0xCFFFFFFF, this should return all values with the values of 0x0103xxxx

Since you are trying to read 29 bit "Extended" CAN id's, try running the NI-CAN bus monitor utility, and see what shows on the bus. The Extended CAN id's show up with an extra bit set in the 0x20000000 position(the bit indicates the arbitration ID is an extended length) so 0x0103FFFF shows up as 0x2103FFFF.
0 Kudos
Message 2 of 7
(7,057 Views)
Your answer is correct for old NICAN driver versions, but how to do it with LabVIEW 7 and NICAN 2.1?
0 Kudos
Message 3 of 7
(7,057 Views)
With respect to my experience it is not possible to filter out. You can only set a positive filter. So you have to define which CAN ID you want to process.

Regard Holger
0 Kudos
Message 4 of 7
(7,057 Views)

Hello, Do you know if Is there any way to filter different and not related arbitration IDs (i.e. accept only frames with arb_id 1,2,3,5,8,9).

Thank you

 

 

 

Message 5 of 7
(6,199 Views)

Hi,

 

If i want to read 800h to 805h arbitration id then what will be the Standard Comparator & Standard Mask value ?

 

Thanxs in advance

0 Kudos
Message 6 of 7
(6,061 Views)

One more question...

 

Can i define the arbitration id range which i want to read & write in the Object name itself or i have to use ncopen.vi function for each arbitration id ?

0 Kudos
Message 7 of 7
(6,059 Views)