LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Threshold Peak Detector

Hi,

I'm trying to count beats given by an EKG signal using the Threshold Peak Detector. Since my signal source can be noisy at times, I felt that this would be the best approach to getting a "heart rate" from our studies.

I would like for the data to be "counted" for 5 seconds, for the number of peaks, and then multiply this number by 12 in order to get a number for "beats per minute." This data needs to be displayed as the heart rate on the screen, and constantly updated with the change in heart rate.

I'm stuck on the part where the data needs to be counted for 5 seconds, and use this number to update the heart rate...so I'd definitely appreciate any suggestions!
0 Kudos
Message 1 of 2
(2,904 Views)
Hi,

Since you know that you'll be acquiring data for set amount of time, I recommend using a finite acquisition. For finite acquisitions, you specify how many samples you want to grab and not how long you want to grab them. So, to calculate the number of samples to acquire, you can use the sample rate and length: samples to acquire = sample rate * length of acquisition.

A great example to build off of would be 'Acq&Graph Voltage-Int Clk.vi'. You would just need to move your data processing and file I/O over to the block diagram.

Please let me know if you would like further clarification.
Joe Friedchicken
NI Configuration Based Software
Get with your fellow OS users
[ Linux ] [ macOS ]
Principal Software Engineer :: Configuration Based Software
Senior Software Engineer :: Multifunction Instruments Applications Group (until May 2018)
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)
0 Kudos
Message 2 of 2
(2,874 Views)