LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting data from sequence structures.

Hi all,

I have a program that contains two pages in a sequence structure. On each page, I am generating data and I would like to plot this data in real-time on an XY graph. I understand that once I've executed Page 0 in the sequence structure, I cannot go back to this page. As such, once this page has finished executed I would need to pass the data to the next page. However, I would like to plot both datasets on *one* XY graph. Is this possible? I've tried putting the graph outside the sequence structure, but the data is not allowed to pass to graph until the page is executed (so it is not real-time plotting). I've included the VI I've been working on.
0 Kudos
Message 1 of 7
(3,042 Views)
Hi,
if you really want to use sequence, you can use a local variable of the graph to add points on the second frame, see modified.vi.
Anyway you can get the same functionality without sequence, see optimized.vi.
Good luck,
Alberto
Download All
Message 2 of 7
(3,042 Views)
Hi Alberto,

Thanks for the solution (modified.vi). I really must use the sequence structure in my real experiemnt. Is there a way to get two different colours for each dataset plotted?

Remington.
0 Kudos
Message 3 of 7
(3,042 Views)
Hi again,
you can use properties to change plot colors, but you cannot have two colors on the same plot. What can be done is displaying the two datasets as different plots, thus set different colors.
See example.
Alberto
0 Kudos
Message 4 of 7
(3,042 Views)
Hi,

Thanks again! This is exactly what I needed.

Remington.
0 Kudos
Message 5 of 7
(3,042 Views)
I believe that there is a better way of doing what you want to do. If you could post your code in V6.0 format, I would be glad to take a look at it.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 7
(3,042 Views)
Hello Mike,

Thanks for having a look Here it is in 6.0 format.

Remington.
0 Kudos
Message 7 of 7
(3,042 Views)