09-10-2013 09:56 AM
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.
09-10-2013 12:43 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-10-2013 01:15 PM
Thanks for your response. I looked over the data points that I am plotting, and I never encountered NaN.
09-10-2013 01:31 PM
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
09-10-2013 03:22 PM
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.
09-10-2013 03:25 PM
Is it always the same two plots? If so, I bet you forgot a couple.
Cameron