LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NOT refreshing XY graph

Hello:
 
I have two stacked sequences and each of them share a XY graph (through a local variable created in the first sequence). I would like the data, from both the sequences, to be entered into the same graph without the previous data being deleted (which is happening right now!)
 
Any pointers on how to plot the data from both the sequences on the same XY graph (real time) without refreshing?
 
Thanks much,
Rob
0 Kudos
Message 1 of 5
(2,515 Views)
Do use a local variable and you really shouldn't need the sequence structure either. If you want to have two separate plots, use the build array function and wire the result to the graph. If you want to have a single plot, then you use two separate build array functions. One for the x data from the two operations and one for the y data from the two operations. The attachment shows the basics of creating two plots in an xy graph.
0 Kudos
Message 2 of 5
(2,507 Views)

To better explain your problem, please attach your program.

  • Do you have two seperate seqences or a single sequence with two frames?
  • What do you mean by "previous data".
  • Do you want to keep the data from the first sequence while adding data from the second sequence?
  • Do you want to append data from both sequences to existing data from the previous iteration?
  • How long does it take to execute the sequences? Would it be sufficient to plot data from both at once or do you really need to update the graph after each individual sequence?
0 Kudos
Message 3 of 5
(2,497 Views)

To better explain your problem, please attach your program. (ATTACHED Program fragment)

In attached vi , are shown two sequences. The first sequence shows XY data passed into it and being plotted. In the second sequence, another set of XY data is generated. I would like to plot the data on the same garph (withouth the previous data being erased)

  • Do you have two seperate seqences or a single sequence with two frames? ( I have a single sequence with two frames)
  • What do you mean by "previous data". (Please see attached program fragment)
  • Do you want to keep the data from the first sequence while adding data from the second sequence? ( Yes)
  • Do you want to append data from both sequences to existing data from the previous iteration? ( Yes)
  • How long does it take to execute the sequences? Would it be sufficient to plot data from both at once or do you really need to update the graph after each individual sequence? (I would need to update the graph after each individual sequence

Thanks,

Rob

0 Kudos
Message 4 of 5
(2,458 Views)
Hi Rob,

I hope you're doing well.  Dennis is exactly on the money with using the build array function before sending the data to the graph.  This will allow you to build your old data into an array with your new data and then send this entire array to the XY Graph.  This way, when you XY Graph does refresh completely, it's still refreshing with all the data to that point.  I have attached a simple example of what I am talking about.  You should be able to integrate a similar implementation in your VI.  Let us know if this helps!

Thaison V
Applications Engineer
National Instruments

0 Kudos
Message 5 of 5
(2,415 Views)