LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clear Graphs of sub-vi only when main VI is run again

I am trying to develop an application and I have some sub-vis in it with Graphs. I am using a case structure to call the sub-vi with graph. The problem is the sub-vi plots values in graph only when i call it. Is it possible somehow to keep plotting the values in the graph in the sub-vi even when it is no called ??? Also i would like my graphs to clear all the values only when the main VI is run again. I tried to use File-Vi Properties-Executing control- Clear indicators when called but it clears the graph every time i call the sub-vi.
 
Any suggestions to solve my problem ??
For Latest TECH News check out my blog at http://directfromdigg.blogspot.com
0 Kudos
Message 1 of 5
(2,801 Views)
You need to do this with reference nodes.  See the attached, for example.  The MAIN.vi calls the sub.vi which is a graph.  MAIN writes a random number to sub every 1/3 second.  To prove there is some interactive stuff happening, you can change the color of the graphing line.

I am sure there are better ways to do it, but this isn't bad.  As for clearing the graph, in the SUBvi, click on file>VI properties>execution and chose "clear indicators when called."  That should do the trick.

-R
0 Kudos
Message 2 of 5
(2,796 Views)

Thanks for your reply Robert. The problem i have is i have 3 different sub VIs and i monitor graphs in each of these. When i surf from these different sub-Vis they start plotting values in graph only when i call that sub-vi. Once i close and call the second sub-vi, the graph in the 1st sub-vi stop plotting data. I tried a lot but cannot find a solution. Do you know how can i close a sub-vi but keep plotting data in it ??

 

 

 

For Latest TECH News check out my blog at http://directfromdigg.blogspot.com
0 Kudos
Message 3 of 5
(2,795 Views)
I guess I don't understand what you mean by "close a sub-vi but keep plotting data in it."  Once it is closed, you can't see it any more, right?  On the other hand, maybe you are referring to changing focus, such that there are two windows open.  When one window is selected, the other one does not update, and vice versa?  I remember seeing a thread on that about two months ago, but I can't find it now.    I modified my previous labview library (man_and_sub.llb) to include two subvi-s to open.  It writes different random data to each subvi and there seems no problem with updating each window.

-R
0 Kudos
Message 4 of 5
(2,787 Views)
What you're asking for doesn't make a lot of sense. No program when it's not running will do anything. How is the data being generated? Is it in the subVI or in the main? Is the data from 3 different sources? Posting your VI and subVIs would help understand the problem you're having.
0 Kudos
Message 5 of 5
(2,786 Views)