LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subvi

Hi all

I have a problem in the attached vi (main draw). I have a large program block diagram so I decide to use a sub vi to do some task (sub points draw) to reduce the space in the block diagram. The idea of the program is to draw some point in xy plane at different color and point styles.

the program has the following error as I run the main draw and enter the [color for the points] to some new colors rather than the defaults but the colors does not updated in the main instead the subvi do, I try also to change the x max and y max but it does not updated on the the xy graph.

I expect that the error occurs because the xy graph is placed inside a loop (my be).

I try to search the forum for a solution but i did not find one.

(Please if some one modifies the programs save as LabVIEW 8.5)

regards

Mido

Download All
0 Kudos
Message 1 of 5
(2,954 Views)
The graph in the subVI is a completely different object. To change the main VIs graph from a subVI, you need to pass a reference of the main VIs graph to the subVI and write to the refernce there.
0 Kudos
Message 2 of 5
(2,943 Views)
Your subVI is updating the properties of the graph indicator in your subVI. If you want to update the properties of the graph indicator in the main VI, pass a reference to the main VI's graph through the connector of the subVI, and have the subVI update the properties of that reference rather than the reference you have there now (which is a reference to the subVI's graph.)
0 Kudos
Message 3 of 5
(2,941 Views)
Is there any examples to show how can I pass a reference to the main. from sub vi
0 Kudos
Message 4 of 5
(2,938 Views)

mido13 wrote:
Is there any examples to show how can I pass a reference to the main. from sub vi

Yes. They ship with LabVIEW. Open the Example Finder and do a search for "reference". 

 

Is this a reposting of your other question?

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