Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-CAN frame read doesn't overflow

Hi everybody,

 

 I'm new to NI-CAN. I'm making some test in order to understand how NI-CAN Frame API works.

 

My configuration is:

PCMCIA series 2

CAN Demo Box connected to CAN0

 

I've realized a VI for testing the overflow in reading CAN frame. As you can see (attached VI) it's very simple.

ncConfigCANNet setup CAN Network Interface Object for CAN0 with Read Queue length=10.

 

I supposed that more than 10 elements enqueued generate an Error, but running the VI this doesn't happen.

VI stops with error when ncGetAttribute arrive at 16338 pending frame.

 

Does anybody explain me why the VI doesn't stop when ncGetAttribute output a value of 10 or a bit more?

 

Thanks in advance,

Paolo.

0 Kudos
Message 1 of 3
(6,496 Views)

The queue size you have to configure with the config VI is actualy the shared memory queue between board and Host. The overall size for this queue for all tasks running in parallel is 300. The driver transfers the data from your configured queue to a large host memory whenever it is half full.

All you have to do is read the data fast enough or to use the read mult to read multiple frames at a time.

If you do so, it is very unlikely that you run into a queue overflow.

 

DirkW

0 Kudos
Message 2 of 3
(6,490 Views)

Thanks a lot!

p.

0 Kudos
Message 3 of 3
(6,470 Views)