LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data not being displayed in xy graph

Hello,

First off I am working in NI LabVIEW 2015 Full Development System for Linux on a computer  running CentOS. The problem I am having is with xy graphs. My code is supposed to take data from a MySQL database and plot it on an xy graph. When I run it, the data gets sent to the graph (I checked by also displaying it as an array) but it does not get displayed. The really weird part is if, after running the code, I copy and paste the blank graph into a blank VI, it shows up with the data that should have been displayed initally. This sometimes go away if I simply copy and paste the entire code in a new VI. Does anyone know why this happens? My progarm is fairly large an I think this may have something to do with it. I would post the code, but the thing I am working on is proprietary.

 

Thanks

0 Kudos
Message 1 of 21
(4,747 Views)

Then post the simplest part of the VI that demonstrates the problem and take out the proprietary stuff.

 

We can't debug words.

0 Kudos
Message 2 of 21
(4,731 Views)

The first thing that comes to my mind is make sure the scales are set to Autoscale.  This is assuming the data is just outside of the visible ranges.  Other than that, we are going to need to see some code.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 21
(4,714 Views)

OK here is a piece of the code that still exhibits the problem. When I run this on my computer the xy graph shows up blank.

0 Kudos
Message 4 of 21
(4,684 Views)

Usually you should use the monotonic data for the x-scale (top cluster element). Note that it didn't show blank when I run your example.

 

Ben64

0 Kudos
Message 5 of 21
(4,681 Views)

It looks just fine for me also.

 

 

 

Do you have another PC you can try running it on?

0 Kudos
Message 6 of 21
(4,673 Views)

The funny thing is that this code will work on the SAME PC if I copy and paste it directly out of the VI into another. I have run into this problem during the course of this project and I always deal with it by copying the code into a new VI. Sometimes however I have to copy it to several new VIs before it will work.

0 Kudos
Message 7 of 21
(4,663 Views)

Are there any other parts of your code that are setting the properties of the graph?  For instance, purple for the color of plot 0 is not the default.

 

Perhaps you have a propery node that is setting the line to off.

Message 8 of 21
(4,656 Views)

So you are saying that the problem is isolated to one PC. Maybe you should try to repair the LabVIEW installation, there might be something coorrupt. Maybe you also want to see if there are updates to your graphics driver.

 

 

How similar is your real code? Of course the graph will only update once the loop has finished. Does it in your real program?

Shouldn't the y axis be formatted as time the way you are using it? (time typically does not go randomly back and forth :o). See if you can replace the while loop with a FOR loop. Currently you are simulating a FOR loop using a while loop.

0 Kudos
Message 9 of 21
(4,653 Views)

Have you tried checking something basic along the lines of your graph properties?  For instance, making sure the point and line styles you're using, or the colors, aren't effectively hiding your data.  I believe you said you're just plotting one set of data, so it's not something like a second line that's throwing off your scale...

 

Oh, are you sending data to the graph in a loop or in one big chunk?  Since it's a graph, if you're sending it in multiple writes, it's only going to display the last write, unless you're already handling that.

______________________________________________________________________
The avatar is for the best weapon in any game ever. But nobody goes there anymore.

CLAD, LV2013, LV2015
0 Kudos
Message 10 of 21
(4,642 Views)