LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

searching data in a file

Dear sir,
 
I have developed a program in labview 7.1 to compress the 3000 data points lvm file to 100 data points file using linear search and incremental method which, takes more than 10 minutes time to compress the data and it varies with the file size. is there any optimized code to to do this operation quickly.
 
Thanks in advance
 
M.S.Senthilkumaran
0 Kudos
Message 1 of 7
(2,931 Views)

I am not sure if you want to decimate your 3000 to 100 data points or if you are extracting a particular set of 100 of the 3000 according to some sort of criteria?

Can you post your code with sample data? Remember to tell the forum what verison of labview you are using.

thanks

David

0 Kudos
Message 2 of 7
(2,915 Views)
M.S.

I'm sorry I could not understand your question. What method do you use to 'compress' your data? My idea of what you meant was more a decimation or so.
I can, however, give some global hints:
1. Read all your data into an array of points. Memory access is much much faster than file access!
2. If the 100 output points (the array size) is fixed, than create an array of that size and fill it with default data. When 'compressing' your data, replace the  single elements with the compressed data elemts. This is much faster than appending new elements to an array, as it avoids multiple memory allocations.
3. Don't display temorary data unless you need to. Block diagram activity cann eat up a lot of CPU cycles!

HTH   and Greetings from Germany!
--
Uwe

0 Kudos
Message 3 of 7
(2,914 Views)

Dear Mr. David and Mr.Uwe,

Thanks for responding to my query.

I am not trying to decimate. My aim is to compress the data in to particular increment.

For example, I have acquired voltage data at 10 samples per second for four minutes. I have chosen 10 samples per second sampling rate to not to miss any event occuring during this test time other wise the rate of change in voltage reading is very slow beause of this when I look in to the data file I can see many repeatative data which is not important to my analysis. so I designed the VI to compress the data file with 0.01V increments. But the performance of my VI is very slow. 

I'll post my VI soon. 

Thank you

M.S.Senthilkumaran

0 Kudos
Message 4 of 7
(2,906 Views)
How to fast my searching program?
0 Kudos
Message 5 of 7
(2,799 Views)
Well, show us the promised VI and we can probably tell why it's slow. 😉 Please try to attach it. Don't forget to include some sample data.
0 Kudos
Message 6 of 7
(2,791 Views)
It will be very helpful to look at your VI so that we can provide some hints/suggestions on how to efficiently scroll through your entire data.
Thanks,

Rudi N.
0 Kudos
Message 7 of 7
(2,745 Views)