LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sub-VI and main VI

My main VI calls a sub-VI. I used the get control value (variant) to get the graph in the sub-VI, and output it to the main VI in a cluster. I set the maximum y scale in my sub VI, and it works. But when I get the graph in the main VI, my maximum y scale doesn't look right. Shouldn't I get the same graph that I got from my sub-VI. Is there a way to fix this? Thanks
0 Kudos
Message 1 of 5
(2,787 Views)
analog wrote:
> My main VI calls a sub-VI. I used the get control value (variant) to
> get the graph in the sub-VI, and output it to the main VI in a
> cluster. I set the maximum y scale in my sub VI, and it works. But
> when I get the graph in the main VI, my maximum y scale doesn't look
> right. Shouldn't I get the same graph that I got from my sub-VI. Is
> there a way to fix this? Thanks

Yes, put the graph on Main vi and pipe the data to it via a reference.
0 Kudos
Message 2 of 5
(2,787 Views)
Hm....but I am using the open VI reference method so that I can control the main VI while the sub-VI is running. When I tried to send the reference to the sub-VI and sets it. The graph just goes blank after every is done.
0 Kudos
Message 3 of 5
(2,787 Views)
> My main VI calls a sub-VI. I used the get control value (variant) to
> get the graph in the sub-VI, and output it to the main VI in a
> cluster. I set the maximum y scale in my sub VI, and it works. But
> when I get the graph in the main VI, my maximum y scale doesn't look
> right. Shouldn't I get the same graph that I got from my sub-VI. Is
> there a way to fix this? Thanks

The Get Control Value function just returns the value, not the other
properties. Other postings point out what you probably want to do.

Greg McKaskle
0 Kudos
Message 4 of 5
(2,787 Views)
I tried to send in the controls of my cluster to the sub-VI and set the property from there, but somehow, everytime my sub-VI is done running, everything just went back to default. My whole graph is gone with nothing on it.
0 Kudos
Message 5 of 5
(2,787 Views)