LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update points in xy graph

Solved!
Go to solution

Hi there,

 

I'm trying to create a VI that shows a circle being generated in real time from the VI Front Panel. I'm using a loop to generate values and then pass the values to a cluster block and then to a graph block. I've attached a VI for you to see where I'm at. When I run the VI the while loop runs continuously and doesn't pass information to the cluster. In the for loop, the loop runs until it hits the counter number and then passes the data to the cluser block on it's way to the graph block. 

 

I'm trying to make the VI pass a data point outside the while loop and for loop on each iteration to the graph. Can anyone please show me how to do this?

 

Thank you so much,

 

James

0 Kudos
Message 1 of 2
(2,655 Views)
Solution
Accepted by topic author JCG77

You can't get the data out of the loop until the loop ends (or unless you do something unnecessarily fancy). LabVIEW programming is based entirely on dataflow and parallelism. This is incredibly powerful and has lead to its success over the years (coupled with the graphical programming), but is usually one of the first things that new developers stumble over. Here's a simple resource to become more familiar with how it works. The Highlight Execution feature is a great way to watch how your application utilizes dataflow.

 

If you want to update the graphs as the data is coming in, then you need to move the graph indicator terminal inside the loop. You can do this by populating arrays that get stored from iteration to iteration using shift registers.

Graph Memory.PNG

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 2 of 2
(2,640 Views)