LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

High Speed Data Acquisition with Peak Valley Detector

Hi all!

 

I am trying to run a simple DAQ program with 5kHz sampling and store to a file. I don't need all the data, just the peaks and valleys, but I stored all of the data to do the analysis in Excel or something. I only need  few seconds worth of data, and analyze about 50 peaks and 50 valleys. It is turning out to be a long process, so I was hoping to try it all in LabView. I played around with the peak detector vi, but I'm not sure it can run at 5kHz.I tried it and it seems to skip over some data. I don't know if I should store all of the data in an array, then run the data through the peak detector vi? And if that's the best way, not exactly sure how to go about doing that. i am attaching the simple VI I wrote to at least capture the data. 

 

Thanks for any help and feedback!

Zach

0 Kudos
Message 1 of 2
(831 Views)

I will give you some tips,

  1. No need to read one sample by sample, read a chunk, probably worth 1s (5000 samples)
  2. Process this set of 5000 samples for peaks & valleys
  3. Instead of writing a line at a time, you could also build up the array and log once outside the loop
  4. You could also use DAQmx Scales features to associate with and let DAQmx take care of applying them to each measurement it makes

 

 

santo_13_0-1628644609540.png

 

You could refer this article on peak detection - https://www.ni.com/en-us/support/documentation/supplemental/06/peak-detection-using-labview-and-meas...

 

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 2
(809 Views)