LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Histogram VI takes forever.

I have a VI setup that will recall a file of binary data. Histogram that data and then do a curve fit.The problem that I am having is that histogramming the data takes a very(very) long time. It may be because the file is so large but I'm not sure. any help would be appreciated. I have 7.0 running on win2K. Here is my VI



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 1 of 5
(2,996 Views)
I am unable to run the VI because I'm missing the "curve fit2.vi" VI. Also, the "Read I16 From File.vi" seems to be different than the standard one in 7.0.

Anyway, try profiling the VIs when you run it to determine the bottleneck (Tools>>Advanced>>Profile VIs...). You could even do execution highlighting if it's slow enough.

3.5 MBs for a file is relatively large to read all at once. The binary file is approximately the same size as it will be required to be in memory. Any time we copy that array, we will have a significant slowdown. Is it possible to read it in continuously using smaller chunks?
0 Kudos
Message 2 of 5
(2,996 Views)
I know that the bottleneck is in the Histogram VI. Because when I run it under highloght execution mode it zips right through the read function. As a fact the exact place of the bottleneck is right at the end of the histogram vi where it gets the data from the .dll.
And yes it is possible to read it in smaller chunks. but I do not know how to set this up. Here are the VI's. Sorry about leaving them out. read.

Thanks



Joe.
"NOTHING IS EVER EASY"
Download All
0 Kudos
Message 3 of 5
(2,996 Views)
I saw it slow down too. There must be a problem with the histogram VI. Here is a pure LabVIEW workaround. Enjoy!!
0 Kudos
Message 4 of 5
(2,996 Views)
Thanks jeremy this helps. But the funny thing is that I have this same histogram VI in a data acquisition VI and it is very fast. It is only taking in small amounts of data at a time though. How could i try to just read in pieces of the data at a time so that I could make sure that it is just the file size and not the VI in general.Because as I said I have this in a very important VI where timing is critical.

Thanks for your help

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 5 of 5
(2,996 Views)