From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: while loop problem

My problem is how to pass the results obtained from a sub vi to a
principal VI indicator.
I create an indicator in the principal VI and a boolean case
structure(obviously the indicator is outside the case structure) linked to
the button (in the principal vi's front panel) which called the sub vi . I
have defined an output terminal for my subVI and i wire from that terminal
(inside TRUE case) out to my indicator.
If the button is pressed (true) the front panel of the sub vi is launched
but when i close this panel (after insertion of imput data and obtaining an
output value) the output value don't appear in the principal VI
indicator......what's wrong?????
In the false case i connect the indicator with a default value...and i
always see this value
!!!
I've tried to send u a photo of the VI code (just the call of the sub vi
trough the
button placed in the front panel of the principal vi) but the message with
the photo doesn't arrive in the newsgroup(why?)

Perhaps the problem is due to the fact that the sub vi is under a while
structure(the subvi closed when i push a button in its front panel)??Is
possible to pass value to the principal vi in this case?How?
Sincerely,
Horackz
0 Kudos
Message 1 of 2
(1,984 Views)
It sounds like your subVI is still running. The output data will not flow from the subVI until it has finished executing. Make sure when you 'close' this subVI you actually press a button to STOP the subVI's execution loop - otherwise the subVI will still be running in memory, but without showing a front panel.

If you still have this problem try using execution highlighting. It may take a while to run through the code, but you can see exactly what is happening to the dataflow and whether your subVI has actually finished executing or not.

Kim
0 Kudos
Message 2 of 2
(1,984 Views)