Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

Run CAN 8473 on with full bus

Using Borland C++ and a CAN USB-8473, I'm trying to watch a full CAN bus and put the data into an STL map.

The CAN/PC can't keep up.  I have the 8473 configured as a Frame

 

I have observed that the Config option NC_ATTR_READ_Q_LEN does not appear to work.  I have set the value to 1000000, which is about 3X more then the amount of data that I sent, but I still get buffer overflows.  I get buffer overflows after about 10000 messages, which should be 100X before I run out of buffer.

 

 

  

0 Kudos
Message 1 of 5
(7,230 Views)

Hi,

 

yes you are right the queue numbers are no used by USB CAN. What error number do you get for your overflow? Do you use the read mult function?

 

DirkW

0 Kudos
Message 2 of 5
(7,229 Views)

I get the following response ncRead::NI-CAN: (Hex 0xBFF62125 NI-CAN copies received CAN frames from the card to a large kernel-level queue.  There is one queue for each interface (port).  If your application does not read fast enough to empty this queue over time, the newest frames are lost.  Solutions:  Call Read more frequently (such as by reducing user-interface code).  ...

 

Is there a hard set size for the queue?  I've been using read (not mult).  

0 Kudos
Message 3 of 5
(7,227 Views)
To monitor a full bus with the USB-8473, use ncReadMult and disable analysis such as graphing during the network monitoring.
Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
0 Kudos
Message 4 of 5
(7,187 Views)
I also needed to not use ncWaitForState, and don't poll ncReadMult in a while loop waiting for a zero size.  Just check it once every 10 msec or so, looking for 150 messages. 
0 Kudos
Message 5 of 5
(7,184 Views)