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.
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.
12-09-2014 08:12 AM
Hello,
I'm acquaring the ECG and blood pressure signals with a DAQ device.
I made a subVI for calculate the beats per minute by usign the peak detector vi. It works fine.
Now I would like to integrate the blood pressure signal between the time of each peak wave from the ECG signal, and after each beat write the result to a numeric indicator.
How can I integrate periodically the blood pressure signal starting from the time of the peak and ending at the time of the next peak from the ECG signal?
I have the time stamp at which each peak occur from the heart beat calculating VI, I just want the blood pressure signal to integrate starting at the time of the first peak, until the the time of the next peak, when is detected. And so on, so every 2 peaks I have one numeric value which represent the integral of that signal, in that dynamic period.
12-09-2014 09:23 AM
12-09-2014 10:19 AM
@GerdW wrote:
Hi simo,
I have the time stamp at which each peak occur
When you know the timestamps you can easily get a subarray of your blood pressure data to integrate. What exactly is the problem?
Thank you GerdW for the reply!
How are you thinking to get the dynamic subarray of data? this is all in realtime, I need to calculate it beat by beat from the raw signal.
Regards
12-09-2014 10:41 AM - edited 12-09-2014 10:42 AM
Hi simo,
How are you thinking to get the dynamic subarray of data?
All I see from your image are plots from two signals. So I guess you have some buffers to store those data. And as you already know the timestamps it should be easy to get subarrays of your signals stored in some buffer(s)!
As long as you only show frontpanel images you will get only that general advice…
this is all in realtime
You use a cRIO or PXI system?
I need to calculate it beat by beat from the raw signal.
You said that before…
12-10-2014 01:18 AM
I use the NI USB-6218 BNC for acquire data and LabVIEW on a personal computer.
For now I don't have a buffer for store the data, I just use the write to measurement file when I'm interested in register them.
I show you the Index.vi block diagram;
The ECG BPM sub-VI (red heart) gives me in output the timestamps (for now this terminal is disconnected), and when the boolean "Pulse" is true, I know that at that time a peak occurred.
How can I create the buffer you talk about? I mean, what is the most efficient way?
I don't think is necessary to store all the signal data since the program will run for many minutes, but just the data in the period between two peaks will be perfect for calculate the integral on the blood pressure wave. At the end, I'm interested to store just the numeric value of the integral.
Regards
12-10-2014 01:53 AM
Hi simo,
- collect data in an array stored in a shift register
- stay away from DDT for that purpose
- once you detected the next pulse you can clear your storage buffer and collect the data of the next heart beat period
There are example VIs coming with LabVIEW. They also demonstrate how to use arrays, shift registers and other basic stuff…
12-10-2014 04:01 AM
- collect data in an array stored in a shift register
Can you please give me an example code?
I'm looking at the examples coming with LabVIEW but I can't find what I need.
Best Regards
12-10-2014 04:07 AM
12-10-2014 04:59 AM
Since I don't have the possibility to take the real data for now, I just simulate a sine wave. The peak detection works fine and it calculate te BPM perfectly.
I converted the data type as you suggested before and made the array.
How can I store the data just from one pulse to the next one? Right now I guess is just storing continuosly.
Regards
12-12-2014 02:19 AM
Hi GerdW,
I've seen the tutoruals and the examples offered by NI but I can't figure out how to do this
Is it correct what I've done with the shift register?
Regards