11-23-2013 03:56 PM - edited 11-23-2013 03:57 PM
Hello,
I attached below my main vi and the subvi. In the subvi is a simple timer in a while loop that starts upon a Boolean button and stops when the time passes. The problem is that I can't see the value of the timer while the subvi is running, on my main vi and I just get the value after the timer ends. I tried to solve the problem using references but I can't get it to work. I think I'm missing something. Can you please help me?
Solved! Go to Solution.
11-23-2013 05:28 PM
The subVI doesn't pass out data to the main VI until it completes. One of the basic dataflow rules.
This question has come up before. Here is one message thread that answeres it. main VI is not updating the data from subVI.
11-23-2013 06:38 PM
One solution, amoung others, is to insert the sub-vi in a panel so you can see it update.
/Y
11-23-2013 07:34 PM
@chis20 wrote:
I tried to solve the problem using references but I can't get it to work. I think I'm missing something. Can you please help me?
i dont see any references? i must be missing something....
11-24-2013 08:50 AM
Thanks, guys for the reply. I saw the topic before but I was still wondering if there is a way to keep my while loop in the subvi, because this is the problem, and do it with some other way. But I quess there isn't.
11-24-2013 05:18 PM
Yes there is.
And if you read message 3 in the link I gave, it would have given you this link. How Can I Update the Changes Made to a Control/Indicator from a SubVI on the main VI?
This shows you how to pass the reference of a main VI control into the subVI, so that the subVI can update it by using a Value property node.
11-24-2013 06:45 PM
I just followed the instructions and I did it! Thanks!