LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid Plots decrease file writing speed ?

My application has a plot of 7 charts and data logger. However, this plotting is decreasing the writing file speed. I tried to use paralell loops with queues, (ploting in a different loop in different threads) but it's still decreasing speed. When the program disables the plots, the speed increases drastically.
Any clues ?
 
Thanks
RKO
0 Kudos
Message 1 of 7
(2,975 Views)
How big are your history buffers?
0 Kudos
Message 2 of 7
(2,966 Views)

I'm not using history buffers. The application acquires data, processes the data and saves one sample at a time ploting in the chart. I tested implementing a buffer to write the buffers, but I still get the delays on the file writing. The data is lost at every 20ms. If there is no plot of data, the file writing is ok.  There are 7 chart plots. Decreasing to 4 plots, the loose of data drops to 10ms.

The points when ploted off-line (reading the file) are like this

......... - 10ms of "silence" - .............. - 10ms of "silence" - ...............

The dots represents data points, and "silence" means loose of data.

In this aplication, I cannot rely on the Sample rate of the board, because of the processing, so I implemented a timebase counter (based on the internal "tickcount" function of LAbVIEW).

ricardo

RKO
0 Kudos
Message 3 of 7
(2,950 Views)
All charts have built-in history buffers. You can configure them by right-clicking on the chart. 😉
 
It is hard to tell what the problem is without seeing the code, there could be many different issues. How many parallel loops do you have? Does each loop have a small wait statement?
 
You can also save some processing by turning off autoscaling, etc. Are the charts just lines or more fancy with dots, etc.? Also make sure they are not set to "synchronous display".
 
Could you attach your code?
0 Kudos
Message 4 of 7
(2,935 Views)
You were right ! I turned off the autoscale and it's good now. But I spent good hours with this and some headaches.
 
Thanks
RKO
0 Kudos
Message 5 of 7
(2,916 Views)

Someone might correct me if I'm wrong:

As you wrote, you try to put the display and the save routines in different threats and pass the data with queues. However if both routines have indicators/Controls showing on the/(a) frontpanel they will both run in the same UI-threat.  

Again, it's hard to tell without code.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 7
(2,909 Views)

next thing: do you use (double) buffered aquisition?  Sounds like a point by point reading. Hello CodeSmiley Wink  

If your apisition fails by enabling the autoscale, it might also fail if there are other system tasks (moving windows with mouse)

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 7
(2,906 Views)