06-02-2009 12:16 PM
Dear all,
I have a Vi A using the data front a subVi B. When I run it, I see the data is updating in the subVI, but not the main Vi and the Front Panel. The subVi has three output channels and the main Vi tries to display those three channel data on the Front Panel.
Could somebody tell me how I can solve the problem?
Thanks a lot.
Roy
Solved! Go to Solution.
06-02-2009 01:17 PM
My guess is that you have a while loop in your subVI. If so, the main is not supposed to be updated as the subVI runs. It will only get updated when the subVI finishes. That's basic dataflow. If you have the front panel of the subVI visible, why do you need to show the same data in the main. Depending on how you call your subVI, you can't do anything with the main until the subVI finishes anyway. That is also basic dataflow.
You might explain what exactly you want the subVI and main to do. Attach the main and subVI
06-02-2009 01:46 PM - edited 06-02-2009 01:48 PM
You could probably use Control Refnums but as Dennis mentioned, be sure to explain the use case to us.
How Can I Update the Changes Made to a Control/Indicator from a SubVI on the main VI?
06-02-2009 01:51 PM
I agree with Dennis' hypothesis.
If the subVI has a while loop in it, data will not be passed to the main VI until after the subVI is finished.
So what you could do is remove the most outter while loop within the subVI.
Then put a while loop around where the subVI is called within the main VI.
This way, you can access the data as it is being updated in the main VI.
If that did not make any sense, let me know and I will try to rephrase it.
06-02-2009 10:11 PM
06-02-2009 10:15 PM