LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Gaps in chart signals

Hi there,

 

I am experiencing an issue here and I am not entirely sure what is causing this.  I have created a gui that has a series of charts and display the signals to the user.  For test purposes I am feeding the same signal to each chart (the signal being fed is a 50 Hz sine wave).  Now I noticed something strange amongst the signals I am displaying to the user.  I noticed that some of the charts have gaps within the signals.  I am not entirely sure what might be causing this and I was wondering if someone has ever experienced something similar to this.  The only things that I programmatically change for all the charts is turning off autoscale, and changing the range of the x scale  (I also adjust the chart history appropriately).  I am not sure if this a labVIEW problem or perhaps a display problem on my computer, because if I use the vertical scrollbar to scroll through the charts, the gaps tend to disappear.  I have also tested this using LabVIEW 2011 and 2012 and with both versions the problem presist.

 

I have attached an image below where I highlight the signals in question; the ones within the red rectangle show the signals with the gaps, and the other signals contain no gaps.

0 Kudos
Message 1 of 6
(2,771 Views)

I've seen this happen if the value you are trying to graph is NaN.  Say I am displaying the duty cycle of some signal on a graph (not the signal itself but the duty cycle).  If my signal is at 0V then my duty cycle will not be able to be measured using standard NI functions.  It will return NaN (not a number).  When you go to graph NaN it will appear as blank on the graph.

 

Not sure if this is your problem and without seeing the code I have no idea where the values come from.  When this happens you can output it to a 1D array of doubles and you should see the value that it can't graph.

0 Kudos
Message 2 of 6
(2,744 Views)

Thanks for your response.  I looked over the data points that I am plotting, and I never encountered NaN. 

0 Kudos
Message 3 of 6
(2,737 Views)

They look to me like what I've seen sometimes when I'm plotting points over a grid, the points don't show when they are exactly on top of a gridline. Your missing points look like they could be on vertical gridlines, particularly since they come in groups of evenly-spaced gaps. It hasn't been enough of a bother to me to find a solution, maybe in the refresh (fast enough to be unnoticeable) the gridlines are written last? I don't know. But, as you say, if you move things they magically appear (they've moved off the gridlines). You might check to make sure you don't have any black-on-black gridlines.

 

I wouldn't worry about it, you've said you don''t think you've lost or corrupted any data (no NaNs), Don't Panic.

 

Cameron

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 4 of 6
(2,732 Views)

On my charts I actually removed the gridlines.  Even though I am not losing any data, I would still like to fix it to make it look more professional.

0 Kudos
Message 5 of 6
(2,719 Views)

Is it always the same two plots? If so, I bet you forgot a couple.

 

Cameron

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 6 of 6
(2,714 Views)