ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy-graph

Hi....
In a xy-graph I'm plotting two y-values at the same x-value. I'm plotting in points-mode (common plots mode). To keep old points in the graph I'm using a while-loop and shift register to put together new y-and x-values with the old ones.
The data looks like:
1-D array of,
cluster of 2 elements,
1-D array of:
double
1-D array of:
double

The first time I'm obtaining the dots in the xy-graph, everything is fine. The second time (in the while loop) the old dots in y-led suddenly has a line connecting them, while the dots in y-led are ok.
This continues also through the next loop.
Anyone who has an idea to get rid of the lines in y-led

Regards
Magnus Svensson
0 Kudos
Message 1 of 10
(4,248 Views)
Hi..

I notice that I left out some words in my Question. The correct line is:
"The second time (in the while loop) the old dots in y-led suddenly has a line connecting them, while the NEW dots in y-led are ok."
0 Kudos
Message 2 of 10
(4,248 Views)
It sounds like you may be using an uninitialised shift register - if you post your code (6.0.2 or less plz) we can take a gander
0 Kudos
Message 3 of 10
(4,248 Views)
on re-reading... it doesnt sound like USR but still need a look...
0 Kudos
Message 4 of 10
(4,248 Views)
Ok...
I'm posting a labviewprogram which contains the problem.
I'm using labview v5.1.
/Magnus Svensson
0 Kudos
Message 5 of 10
(4,248 Views)
Inside your while loop, you're creating a new plot each time and not appending new data to a single plot. Take just the x and y arrays and append data to them. Do not use the build array with the graph cluster as inputs. I can't save a VI as 5.1 but maybe someone else can post a corrected example.
0 Kudos
Message 6 of 10
(4,248 Views)
I've have been trying to use your solution and correcting the program, but I'm afraid I haven't been able to solve it. Could you please post a print screen picture of a correct program? That would be grateful.
Regrads Magnus Svensson
0 Kudos
Message 7 of 10
(4,248 Views)
I hope I am interpretting what you want to do correctly. Take a look at this code. The way I have coded this you are only drawing two traces, not adding a trace to the plot on every iteration of the inner while loop. I hope this answers your question.
Message 8 of 10
(4,248 Views)
Try something like this or Blimpie Boy's
0 Kudos
Message 9 of 10
(4,248 Views)
Yes..thank you...It is working.. 🙂
You manage to make me to understand what I was doing wrong the whole time. Thanks to you all...
Have a very nice day
A happy Magnus Svensson
0 Kudos
Message 10 of 10
(4,248 Views)