LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN problem: Error BFF62125

Hello all,

 

I keep on getting this CAN error BFF62125:

 

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); Avoid running other applications during your test 
(screen savers, MAX, ...); use Series 2 Filter Mode to filter 
incoming traffic.

 

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); Avoid running other applications during your test (screen savers, MAX, ...); use Series 2 Filter Mode to filter incoming traffic.

 

I suspect this may have to do with my card trying to write too often, but this seems to be the wrong message if that was really the problem. The thing is, I don't even use the ncRead function. I am only using that port to send messages, but not to read messages. Any ideas on what causes this error? Thanks.

0 Kudos
Message 1 of 9
(3,166 Views)

Greetings Bladhart.

 

In the course of researching this issue, all previously reported instances I've seen were ones where this error was encountered in an application that was performing a read.  That being said, it is not completely impossible that the cause of the error is related to your card trying to write too fast and creating an 'underflow' situation.  If this is the case, as you noted, this would not be the most appropriate error message.

 

In the CAN Network Interface Config, what value do you have set for the Read Queue Length and Write Queue Length?  Also, can you elaborate on your setup?  What hardware are you using?  What are you communicating with?

 

Regards,

 

Michael G 

Michael G.
Applications Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Self-realization: I was thinking of the immortal words of Socrates, who said, "... I drank what?"
0 Kudos
Message 2 of 9
(3,145 Views)

 


Bladhart wrote: 

The thing is, I don't even use the ncRead function.


That's probably why you're getting the error.  Something else on your CAN network is sending packets, and your NI-CAN card is receiving and queueing them.  Since you never perform a read, the queue eventually fills, generating that error.  If your card supports filtering, you can set up the filter to reject all packets; otherwise, you should probably call ncRead every once in a while.

 

0 Kudos
Message 3 of 9
(3,142 Views)

Hi all, I am new to the forum not sure how to post etc. So its bit of a learning curve for me for now.

I have the the same problem I think. I can actually write 29,500 frames of data (108 bits per frame) and I can read about the same amount. But if I increase the write to 30,000 frames I get the following error: I can read/write as many times as I want below 29,500.

"Error BFF62125, 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); Avoid running other applications during your test (screen savers, MAX, ...); use Series 2 Filter Mode to filter incoming traffic.kernel-level queue".

Equipment/Software: NI-CAN model USB-8473 (RS232 to USB) windows 7 pc using ni_can15 driver.

I have tried to increase the write/read queue in my network interface shown below. Any suggetions would be greatly appriciated?

CAN error.jpg

 

0 Kudos
Message 4 of 9
(2,936 Views)

What's wrong with the suggestions in the error message: read more frequently, or filter the packets? Is neither of those an option for you for some reason?

0 Kudos
Message 5 of 9
(2,897 Views)

Thanks I will try your suggestion.

0 Kudos
Message 6 of 9
(2,883 Views)

If I run the program from source code the program can only write\read 20k frames sucessfullly. Anything after 20k frames the BFF62125 error is displayed. I have tried reading more frequently and filtering the packets in the source code mode, no help.  If I create a excuable from source code and then run the program, I can now write up to 65k frames.. not sure why?? but if I try to write\read after this number the program just keeps trying to reach for example 70k frames. I have to stop the program... note the BFF62125 error is not displayed in the execuable run mode. Any suggestions?

Thanks

 

0 Kudos
Message 7 of 9
(2,814 Views)

A compiled application requires a lot less memory than the LabVIEW development environment, so perhaps that's freeing more memory to use as the CAN receive queue.

 

A good start would be to replace ncReadNet with ncReadNetMulti, so you could read the entire buffer of frames in a single loop iteration, instead of reading one frame per iteration as you're doing now. However, you should consider what you want your code to do. Building an array in a loop (especially one element at a time) is extremely inefficient. Also, a loop with no timing mechanism is a bad idea - the loop will run as fast as possible, consuming all available CPU time.

 

It appears you know in advance how many frames you want to read, so you should pre-allocate an array of that size and remove the build array functions. Read the entire buffer of frames at once, then use Replace Array Subset to insert that data into your pre-allocated array.

 

Can you upload your entire VI? What are you actually trying to do here?

0 Kudos
Message 8 of 9
(2,799 Views)

Hi Nathand,

 

I will try your suggestion today. I will upload the entire Vi as soon as I figure how do it. I want to to able to write at least 150k write/read frames.

 

Thanks

 

 

0 Kudos
Message 9 of 9
(2,744 Views)