LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getting an output of a while loop from elasped time

If I use the attached vi as a sub vi, I can get the output out of the while loop unless I'm willing to open it when I call it which I not.
How to I show the indicator in calling program.

thanks
0 Kudos
Message 1 of 15
(5,443 Views)
I think you forgot to attach the subvi.
0 Kudos
Message 2 of 15
(5,442 Views)
0 Kudos
Message 3 of 15
(5,434 Views)
I am not sure that I understand your question.  You want to use the subvi to output the indicator but you dont want to call it from the main VI?
0 Kudos
Message 4 of 15
(5,428 Views)
I put the vi into a case statement. The case is called the vi runs without opening it. Under this condition, I have been unable to get the changing output to the main front panel. In the vi I sent you, you can see that one indicator changes and one doesn't. When the one that does change is made to be an output of the vi, it doesn't change. If I can get the fix one to also change then I can get that output to my front panel.
0 Kudos
Message 5 of 15
(5,421 Views)
Sorry for the miscommunication, take a look at the two VI's I attached.  They should accomplish what you want them to do, just run the caller VI, it calls the Time To Q.vi and uses a queue to read off the value inside the while loop.

Cheers!
Download All
Message 6 of 15
(5,415 Views)
Thanks.

It seems very complicated but if it works.
0 Kudos
Message 7 of 15
(5,411 Views)
Thanks.

It seems very complicated but if it works.
0 Kudos
Message 8 of 15
(5,411 Views)
It uses queues to pass the data from the subvi to the main vi, I am sure that there are other ways to do it but this one popped into my head first.  I wouldnt be surprised if someone chimed in with an alternative way to do it.  But it should get the job done for you.

Cheers
Message 9 of 15
(5,409 Views)
There are other ways. Global variables or references will work. Here's how references are used.
Download All
0 Kudos
Message 10 of 15
(5,403 Views)