LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to filter data in spread sheet file?

Mike,

I did not save the vi - I think there is a NI server function running in the background, and if I first start the one LV version, this server runs even if I close labview. And if I start the other version, something get's screwed up? At least, if I restart the computer, the first version I start works fine, but the second does not (either 6i or 8.5).

Sven
0 Kudos
Message 21 of 31
(1,188 Views)

Hi Sven,

do you start the other version if the first one is still running? How big is your project?

Mike

0 Kudos
Message 22 of 31
(1,182 Views)
well, I closed the one version, and then started the other, but actually, this is not the real problem.

How "big" my project is? I have about 50 files, some with only one channel, others with up to five, and the size is between 30 and 200 megabytes (depending on the number of channels and the length of the recording time).

Most of the files are ok, that is, they a good signal-to-noise ratio, but some, like the example above, are really noisy. I am not sure, what the source of this noise is, as the recordings were done about 5 years ago.

Now I look through the old recordings and want to find out how many peaks there are, and if they are clustered or dependend on each other in the one or other way. So I scroll through the files and write down the start and stop times, and then I calculate the time between two successive peaks (with Lotus 1-2-3).

Vincent helped me with the vi which smoothes the signal in the noisy files, but the script cannot read the large files, I get an error message. But I can circumvent this by cutting the files into small pieces and analyzing them one after the other.

So, it is not a really big project. But I think I will buy a book about Labview programming, might help me later, next project...
0 Kudos
Message 23 of 31
(1,169 Views)
By the way - I don't know if this helps, but I just learned that the reason for the noise might be a missing condensor, which was used then as a filter between ground and channel-in. At least my advisor thinks that he used one, at that time?
0 Kudos
Message 24 of 31
(1,165 Views)

Hi sven,
this is the vi in order to count peaks.
Choose the path of your file, the level of the trigger, and then execute the vi.
It is not optimized for large files, but i can show you how to do to treat such a big file.
Best regards,
vincent

V-F
0 Kudos
Message 25 of 31
(1,148 Views)
with the good vi... Smiley Sad
V-F
0 Kudos
Message 26 of 31
(1,144 Views)
Hi Vincent,

Well, I am not sure that I understand what the difference is between threshold level, number of threshold, and tableau ajuté? Where should I fill in the value of the trigger? And what are the other slots good for?

🙂 Sven
0 Kudos
Message 27 of 31
(1,118 Views)
in count peaks.vi :
-Treshold level : set the value which be used as trigger : if you put 2, you will count the number of peaks over 2
- Number of treshold : number of times that your signal has been over that 2
- Tableau ajouté : is the table that is saved at the end of the execution (open it with excel, or notpad). You will have 3 columns : time/signal/signal filtered with cubic spline.

Hope it helps you.
best regards,
Vincent.
V-F
0 Kudos
Message 28 of 31
(1,116 Views)
OK,

Now I understand the large file I get in the end. But I think we have a misunderstanding - the saved file is what I need for the noisy files. But from the other files I not only need the number of peaks over threshold, but also the times when the threshold is exceeded (as I need the time interval between successive peaks)!

See: the question is - are the peaks distributed randomly, or are they clustered. So, if I use the peak.vi with the file I posted with a threshold of 2, I get 87 peaks. But I need to know when these peaks occur - is it possible to insert a second "array to spreadsheet" sub-vi, that will create a file with the (already calculated) values of the peaks (like time of the upward crossing of the threshold, time of the peak/highest amplitude, time of downward crossing of the threshold?

Truly yours!

🙂 Sven
0 Kudos
Message 29 of 31
(1,113 Views)
Hi,
see attached file, when you execute, it will save a file with the time when a peak BEGIN to be higher than 2V (it doesn't give you the time of the maximum).
What I can suggest to you is tu understant my code, and you will be able to implement the code that you dream all the night on !
Hope it helps you.
Best regards,
Vincent
V-F
0 Kudos
Message 30 of 31
(1,093 Views)