06-01-2014 09:40 AM
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.
06-02-2014 12:04 AM
If you look at the numeric data at those points, what do you see?
Mike...
06-02-2014 05:31 AM
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?
06-02-2014 06:10 AM - edited 06-02-2014 06:14 AM
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...
06-02-2014 06:23 AM
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?
06-02-2014 09:05 AM
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....
06-02-2014 11:13 AM
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.
06-02-2014 01:04 PM
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...
06-03-2014 03:22 PM
Thanks a lot, i solved the problem