LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ecg gap in waveform chart

Hi, i've got a problem with my project about ecg. I want visualized an ecg signal using labview and my  soundcard of pc, but when i start my project there are some gaps on my chart. What is the problem? i have to increase the number of samples/sec?.

i attached my .VI in this message. Thanks to everyone.

Download All
0 Kudos
Message 1 of 9
(4,471 Views)

If you look at the numeric data at those points, what do you see?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 9
(4,429 Views)

thanks, i see the nemric data of the point. If i look the number of the gap it isn't zero. what i have to do?

0 Kudos
Message 3 of 9
(4,406 Views)

What is the value in the gaps? The course of action is dependent upon what the value is. One common cause for gaps in plots are data values that are "NaN" or Not a Number. NaN values typically result from failed calculations.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 9
(4,401 Views)

ok thanks, i saw the numbers and for example thay are 0,00125 and so on. can you tell me how to change the NaN value?


0 Kudos
Message 5 of 9
(4,388 Views)

The first step is to get rid of the express VIs and replace them with the normal VIs that perform the same functions. This is so you can see what is actually happening -- Express VIs hide too much logic. Next compare the data coming from the acquisition VIs to see what the raw data looks like at the gaps. Also, if you turn off the horizontal grid on the plot it would be a lot easier to see exactly where the gaps are.

 

Mike....


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 9
(4,370 Views)

thanks a lot for your help, i've replaced the Express VI but the gaps remains, i remove the grid and i attached the picture.

0 Kudos
Message 7 of 9
(4,361 Views)

Ok, I see the problem -- I'm sorry it was there all along but I didn't catch it. It wsn't until I saw tha gaps occurring at regular intervals that I saw what was happening.

 

The gaps you are seeing are literally gaps in the data. Look at what your code is doing: With each iteration of the loop you are initializing the port, reading a block of data and then close the port and checking for errors. The gaps you see are because you are stopping the acquisition and then, a few msec later, restarting it.

 

The first thing to do is to move the intialization and termination code outside the loop such that the initialization runs before the loop starts and the stop runs when the loop finishes. Pass the reference and error cluster into and out of the loop using shift-registers. This change will certainly make the gaps smaller, but might not make them go away altogether. The reason is that I don't know if the analog input VI you are using provide truly seamless acquisition.

 

To make the gaps go away completely, you may have to use a real analog input board. Checkout the DAQ examples that ship with LV and look for seamless acquisition.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 9
(4,350 Views)

Thanks a lot, i solved the problem Smiley Happy

0 Kudos
Message 9 of 9
(4,326 Views)