Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

LIN Write Queue Overflow - Help

I am having "Write Queue overflow" error for the LIN monitoring program.

Basically, I am sending a master message to my DUT and same time monitoring the slave message from the DUT.

The problem always happen, the smaller value I put the timer, the faster I get the error. 

Details are as attached screenshot.

 

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

Hey wanglei83,

 

In your write VI, you are checking the number of frames left in the read queue.You shoud be waiting for the transmit to complete before you write another frame in the queue.  This should prevent you from overfilling the queue.  You can use the wait for state VI to do this.

 

Let me know if this helps.  Have a great day.

O. Proulx
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 3
(6,731 Views)

Hello. I have a similar problem. As you can see for the attached program (only part of the main code), I am trying to do something relatively easy. I want to write to the LIN bus and then read the information that is sent to me by the prototype board (includes a PIC microcontroller that deals with the LIN bus). In order to achieve this I initially copied large parts of the “write header frame and receive LIN” example. I have produced my own LIN analyser txt box which is at the top of the loop.

I replaced the write button with a timer that has selectable period. I would like to write to the bus with minimum period of 1ms. What happens is that the program will stop writing at random intervals (which can also be seen from the LED of the LIN device which I use as interface (NI USB-8476s)). The biggest mystery is why the program (although it keeps running) it stops writing. By using the attrvalue of the read vi I don’t see any queues of data and I don’t get the  over flow error. Even the timeout vi attributes are in accordance with the write vi (i.e. 2 for successful write, 0 when the program stops writing, meaning that I can’t really understand anything from that). I managed to “overcome” the problem by auto resetting the loop every time it stops but I’m not happy with this solution because I would like to know somehow why I get this problem and if can solve it without resets. Is there a way to see the queues that exist inside the write vi? Do I overload the bus? And if yes how could see that?

 

Kind regards

Theo

 

PS: I have attached 2 subvis that you will need to run the main body (ignore the other ones -not needed for this part)

PS2: The start and end contain also some attibutes that i may not really need, just included them when i was experimenting!

Download All
0 Kudos
Message 3 of 3
(5,934 Views)