From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Life Science

cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure distance between R-R peaks

  Hi Friends,

 

I am trying to measure the distance between two R-R peaks and plot the respective frequeny spectrum from that, which is as shown in the attached picture. I could not find how to do it, kindly have a look at my vi.

 

Thank you,

Regards,

abi

Download All
0 Kudos
Message 1 of 36
(14,965 Views)

Take a look at the attached.  I modified your existing program to read in the data and accumulate the R-R intervals and Heart Rates.

 

I also allowed the vi to remember the position of the last peak from the previous loop iteration so it can computer the data correctly. Also the program will ask for a file name and end when the EOF is reached.

Randall Pursley
0 Kudos
Message 2 of 36
(14,946 Views)

Dear Mr.Pursley,

 

Thank you very much for mod vi, could you please explain me a bit about the changes you made in the mod vi.

Actually I am using a real time data and not from a file, so I tried replacing  the input file  by a Daq assistant to read the data here in this vi, but it doesnt work. Is it necessary to specify the file dialog to read the file every time. How can I get a real time data using Daq assistant in this vi.

 

Thank you,

abi

0 Kudos
Message 3 of 36
(14,939 Views)
I have commented and modified the previous vi to use DAQ to collect data.  Take a look at it and see if it does what you want.
Randall Pursley
0 Kudos
Message 4 of 36
(14,931 Views)

Dear Mr.Pursley ,

 

I have a question the vi is still asking for a file name every time I run it, but I dont want to read it frm a file, I want to read it directly from the Daq acqusition device in real time. So for this I just connected the DAQ device to notch filter as shown in the vi, but I think something is missing here. Kindly have a look at it.

 

Is it necessary to specify a file name every time, because it is just reading the data from the previous file and not the real time measurement  when I run the vi.

 

Thank you for your time.

abi

0 Kudos
Message 5 of 36
(14,920 Views)

Sorry about that.  I added in the file read to double check the rest of the code and forgot to take it back out.  The attached should be right.

 

 

 

Randall Pursley
0 Kudos
Message 6 of 36
(14,915 Views)

Dear Mr.Pursley

 

Thank you once again for really helping me out, I will get back to you, if I have any questions in the future.

0 Kudos
Message 7 of 36
(14,908 Views)

Dear Mr.Pursley,

 

In my program the vi is acquring data for 5 seconds only and then it stops, and all the varying parameters such as heart rate and R-R intervals stop after 5 seconds, and it remains the same, I mean it does not vary or continue further with time.

 

Say for suppose I need to check the data for 2-3 minutes continously´, the heart rate and the intervals also should change along with time, but thats not happening here, it just reads the data for first 5 seconds and the values remain constant, irrespective of how long you run the vi. I want to make this vi continously running with changing parameters. Kindly advise what I need to do in order to display this.

 

Thank you,

abi

0 Kudos
Message 8 of 36
(14,899 Views)

The program I attached in an earlier message works fine for me.  Make sure the Stop button hasn't been pressed before the program has even started.

 

 

 

Randall Pursley
0 Kudos
Message 9 of 36
(14,898 Views)

Dear Mr.Pursley,

 

I checked it again with your mod vi it scans for the first 5 seconds and displays heart rates and R-R intervals, and this remains constant from then, only the locations are changing with time and not the respective Intervals and heart rate.

Is this normal, I am little confused here wheather its working correctly or not.
Message Edited by infra444 on 10-28-2008 04:05 AM
0 Kudos
Message 10 of 36
(14,892 Views)