Showing results for 
Search instead for 
Did you mean: 

how to update the variables in sub-vi on main front panel?


The problem is to display variables in Sub vi on main front panel.
What should I do?

메시지가 04-07-2005 03:14 AM에 julitan에 의해 편집되었음

0 Kudos
Message 1 of 5

You'll need to attach your sub VI as well as the main VI. 🙂
0 Kudos
Message 2 of 5
0 Kudos
Message 3 of 5
You probably want the slide to update while the while loop in the subVI is running, so you can't simply wire an output from the subVI to the main VI. So you are going to have to use some form of communication between the two VI's other than a hard wire. For this simple case I think I would recommend using a global variable. You could also use DataSocket or even write the value to disk, but using a global is probably the easiest method for this case. I've attached your modified VI's. Let me know if this works for you.
Robert Mortensen
Software Engineer
National Instruments
Message 4 of 5
Now I see your message.
It works well in my code. Thanks for your advice. 🙂

I have never used the global variable in this case.
I learn the new thing.
But I still wonder how other methods(data socket or writing the value to disk) work.
0 Kudos
Message 5 of 5