ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cardiac Frequency

How would I go about measuring the time between two peaks of a cardiac
input signal? I am new to labview and I don't know how to use the clock
properly. I tried putting the signal through a comparator and looking for
the peaks, but how can I get time (and thus frequency) between two of
them?

Any help would be great

Thanks,

Andrew
0 Kudos
Message 1 of 3
(2,747 Views)
Hi Andrew,
your DAQ board should have also counters that you can use for precise time measurements:
You have two basic ways to control the start and atop of the counter: software and analog triggering.
Software triggering is easier to implement but is less accurate (approx.10-20ms of indetermination in Windows OS), but for your application maybe this is ok.
Hardware triggering requires some few external connection to control the gate input of the counter, this is definitely more accurate.
Since I don't know which board you are using, I can't be more specific on how to use the counters of your board; in LV examples there are several vis that explain how to implement both methods for different types of counters.
Let me know if you need more help, in case give me details on yo
ur hardware.

Good luck,
Alberto
0 Kudos
Message 2 of 3
(2,747 Views)
I'll suggest to capture the signal and then processing it. You can even process the signal while capturing it.

To detect peaks and valleys in a signal, use the "peak Detector.vi", which is located in:

Signal Processing -> Measurements

To use this vi, your signal must be in array form. Once you know where the peaks are, and knowing the sampling frequency, you can obtain the parameters you are looking for.

The attach file is an example on how to do this. It is a .zip file which contain a vi and a text file. The text file is an aqcuired EKG (Electrocardiogram, or cardiac signal as you call it). When you run the vi, a dialog appear on which you should select the EKG text file. The vi calculate the time interval between peaks and the inverse of that time interval (
frequency). The vi, which is written in LabVIEW 5, have some notes in the diagram.

Also, I suggest to review the examples provided with LabVIEW, specially those about signal processing. You can analize the signal while capturing it and determine its frequency using some spectrum analysis function.

Best regards;
Enrique
www.vartortech.com
0 Kudos
Message 3 of 3
(2,747 Views)