Discussion:
to measure time period between two peaks
(too old to reply)
kgangs
2008-07-01 20:40:06 UTC
Permalink
Dear ,
 
   Input for my applicaiton  comes from a DAQ,  Iam trying to get that signal and measure valid peaks and then trying to detect time period between two valid peaks. Iam using threshold peak detector to detect valid peaks.The output terminals from it are only COUNT, ERROR, INDICES on right hand side to it. For measuring the time period I have been advised to use Tick count timers. So that initial time tick count - Final time tick count gives you the time period between two valid peaks. In fact my input is an ECG wave , which is  regular , periodic and  has regular peaks in it. Normally its time period is 0.8 seconds with an amplitude of about 1 milli volt.  right now, Iam confused where I can wire the right handed output terminal from the tick count to be joined,  to get time period between two peaks. I think you understood my problem. Please tell me how / where to connect these terminals to get my out put. I need time period between two valid peaks like time period between 1st and 2nd peak or like time period between 2nd and 3rd or between 3rd and 4th peaks.and moreover the wave form graph indicator is dispalying/ showing the wave for only 0.1 seconds. even when i tried to increase the scale on X- axis it is still showing the graph for only 0.1 seconds.  thank you   regards KIRAN


kiran.vi:
http://forums.ni.com/attachments/ni/250/41260/1/kiran.vi
Hillman
2008-08-06 14:40:15 UTC
Permalink
Hi KIRAN,

Using the peak detector vi found (signal processing >> signal operation >> peak detector) you can create an array of the locations of all the peaks, this is better than the indices option on express vi as it resets everything.

Then using this equation:

Time Locations[i ] = t0 + dt*Locations[i ]

dt = 1000 (looking at your DAQ assistant)

you could get an array of times.

Then we some looping and index you could work out the time between the peaks.

I hope this helps, post again if you dont follow,

thanks

 


kiran[2].vi:
http://forums.ni.com/attachments/ni/250/42126/1/kiran[2].vi
Hillman
2008-08-08 07:40:07 UTC
Permalink
Hi KIRAN,Just wanted to correct a few things, your dt is 1/1000 -- using your sample rate (Freq) of 1000. And I was wondering if you had made any progress.. was interested to see.Have a good day,
Loading...