11-17-2010 11:00 PM
Hello Experts,
I am new to labview and I have been working on a VI on acquiring the duration between 2 peaks (real time). The signal source is human ECG/EKG (heart signal - PQRS). It has one huge spike and couple other smaller ones in every beat, and the signal is noisy. Now, what I am trying to do is just to get the duration between these peaks in real time (so it changes at every beat or it could also be the average of several peaks).
Hopefully, I am not confusing any of you.
I have spent a lot of time trying, but can't really understand how to use some of the available functions.
If possible, can anyone of you post a simple example of how this could be done? (using sinosoid signal - with noise - as source would be enough).
crossing my fingers!
Thank you in advance!
Solved! Go to Solution.
11-17-2010 11:27 PM
Probably the offline method that I would suggest would be to write down your data to a LVM/TDMS file in which you will have two columns , out of which one would be the Time channel , from there you can easily map peak-to-peak value to the corresponding time difference.
Alternatively , in real-time , you should use the Waveform Peak detection VI:
It also give the time locations at which the peaks were detected , so give the inputs accordingly and that should solve your problem.
11-18-2010 03:18 AM - edited 11-18-2010 03:22 AM
You are in luck. Go to help in the toolbar, select Find Examples. Search for peak. Open the example named "Peak Detection and Display.vi" That VI will give you a push in the correct direction. Also stay away from using Express VIs in your project. Express VIs is just some flimflam that NI has glued ontop on Labview, using very cheap glue. Express VIs do always cause problems than they do good
Also if you have noise problems. Some filtering will in most cases help. And Labview have many options for digital filtering.
11-18-2010 08:34 AM
A Savitzky-Golay filter may help if you have noise issues that cannot be solved with the peak find routines alone. You may also want to check out the biomedical startup kit for code which probably already does what you are trying to do.
11-22-2010 03:36 PM
I'm also very new to Labview and am having trouble following exactly how to piece together this program. I think I understand how to assemble it but don't know where to find all of the individual components in Labview. I've spent hours trying to hook it up and have yet to get a working version, is there any chance that you could post an actual VI for this? I'm also having trouble understanding how you run this program using dynamic data (real-time ECG) instead of a source generated one. Thanks
11-23-2010 06:56 AM
@zach843 wrote:
I'm also very new to Labview and am having trouble following exactly how to piece together this program. I think I understand how to assemble it but don't know where to find all of the individual components in Labview. I've spent hours trying to hook it up and have yet to get a working version, is there any chance that you could post an actual VI for this? I'm also having trouble understanding how you run this program using dynamic data (real-time ECG) instead of a source generated one. Thanks
Instead of HIJACKING a thread that is by most remotely connected to your problem. Start your own thread As a reminder good questions draw good answers. It very hard to see why and how you struggle. In the new thread you are going to start. You must describe your problem much better. Like what you have done so far. And posting whatever you have created as code. Is always smart.
See if this will be a better forum for your post http://decibel.ni.com/content/groups/biomedical-user-group
11-23-2010 08:31 AM
You misinterpret, the original post was made by a group member of mine for a project that we are working on so we have EXACTLY the same problems and I am not hijacking someone's thread that is only remotely connected.
11-29-2010 03:37 PM
That was a great example! Thanks for your help!
Since I am trying to have the duration displayed in the VI. Right now, it has the location positions in the block of data (DBL). In the VI there is an up and down button where you can look at the value of the location of the first peak and the 2nd peak. To get the duration, I have to take the difference of the two locations (substract).
Now, i am still trying to figure out how to go about this (splitting the data of the DBL?).
Hope, this is not too confusing
Thanks again in advance!