Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN read buffer overflow (CCP application)

I have programmed my CCP application, which communicates with an ECU for the purpose of setting up data acquisition and calibration.  This all works well.
In conjunction with this, I have created a user interface vi., which is about 20Meg in size (I know is to large but theres no other way).  Both these vi's run simultaneously.
 
I have a CAN read function which I call every 5ms within a while loop.  I am reading 1 sample at a time because without a timestamp on my data acquisition, Im using local loop time to determine time between messages.  All this works fine and the 5ms read is a more than sufficient read rate, however after running this for a period of several minutes, the system begins to slow giving:
 
1) Samples pending flutters off zero and slowly begins to increase.
2) Loop time of 5ms cannot be maintained which is why the above happens.
3) When samples pending reaches a high enough value, the buffers are full and i get an error.
 
If I close my whole labview application down and restart, it is then ok.
 
I am quite confident that my application is pretty efficient and no while loops are "hogging" any time.  I monitor all while loops and loop timing to ensure this.  I am trying to reduce Windows processes to help solve this.
 
Is Labview using significant resources somewhere, which arent being cleared, thus giving me this error after a certain period?
 
 
0 Kudos
Message 1 of 2
(3,305 Views)
I would suggest to monitor the memory usage of your application. If the usage is getting bigger and bigger you have a memory leakage somewhere. May be an unclosed reference. Most of the time, LV closes them itself but there are some exceptions.
0 Kudos
Message 2 of 2
(3,300 Views)