05-20-2009 03:36 PM
Hi,
I am making an hartmonitor VI for school. I managed to calculate the hartbeat. I connected it with a cluster bundle to my x y graph. But my x y graph doens't show anything. Please can you tell me why. This is my VI
Solved! Go to Solution.
05-20-2009 04:04 PM
At one point, you are dividing an array by an empty array constant. The output of that operation is always an array with 0 elements
Bill F
05-22-2009 02:33 AM
Ok thanks,
I understand now. But is the way I calculated the heart rate going to work for real time measurement with a DAQ-card and LED sensor.
Abi. This is the corrected VI:
05-22-2009 04:37 AM
05-22-2009 05:39 AM
I am now using the other peak detector. The heartbeat is now lower. But I don't really know if it i will work now in realtime.
Abi
05-22-2009 06:14 AM
No it will not work. You are doing things the wrong way. You must use the peak locations. The first beat is peak(1) minus peak(0), the nest beat is (2)-(1) and so on. If you divide with the sample rate you will get the time between heart beats. This is equal to the period time. The frequency is the reciprocal(1/x). You can go directly to frequency by dividing sample rate with beat interval in samples. Which sample rate do plan to use and how often will you update your result in real time?
05-22-2009 07:14 AM
Coq rouge,
I think my acquisition mode will be continuous sample with a sample rate of 1000 Hz and sample period of 0.001 s.
05-22-2009 07:26 AM
05-22-2009 08:00 AM
Coq rouge,
I don't understand what you mean, because I am using the peak locations and with de derivative I am calculating the number of samples between peaks. And I also divided it with de sample rate in de VI I showed you before. Can you please show me an example?
Abi
05-22-2009 08:28 AM
You DO NOT need the derivate consentrste on the locations array. As told I you.
The first heart beat is the value in locations[1] minus the value in locations[0]. A for loop running #found-1 should do the trick