LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI will open and shut down immediately

When I run this program, the VI that is called opens, then shuts down immediately. I open the subVI from the VI Server then i want the VI Server to wait until it recieves a signal to shut down the subVI.
Ron Deavers, CLD
0 Kudos
Message 1 of 6
(3,279 Views)
What does the Final1.vi do? Does it continue running until stopped or is it possible that a Stop condition exists in that VI which causes it to quit before the Stop button in the main VI is pressed?

Lynn
0 Kudos
Message 2 of 6
(3,270 Views)
This program opens the subVI. The subVI runs the test. When the test finishes, a boolean indicator is set to true (FinalDone). When that is recieved as true, this VI shuts the subVI down.
Ron Deavers, CLD
0 Kudos
Message 3 of 6
(3,267 Views)
Lynn is right. You need to explain what the subVI is doing or post it. Also, instead of checking the state of some front panel button of the subVI, I would use the property Exec.State. The possible states returned are Bad, Idle, Run Top Level, or Running. You could use detection of Idle to determine whether to close the subVI.
0 Kudos
Message 4 of 6
(3,263 Views)
You should use the Error In and Error Out to see if you have Datasocket errors. Run the vi with trace execution on, and use probes to look at data outputs and error out of various steps. You may have a datasocket error, you may have an error opening the Final1 vi, or the FinalDone boolean might be True before the vi is done. Also, you could clean up your wiring a bit before posting. It makes it very hard to follow the logic when you have wires hidden and wires looking like they are connected to the right side of a funtion when they are actually connected to the left side. We are here to help you, please don't make it more difficult with bad wiring practices.
- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 6
(3,259 Views)
Since you haven't posted the subVI, I ran it with the other subVI you posted with one of your other questions. That subVI opens and stays open and everything seems to work as it should. So, the problem is in your subVI and without that, it's going to be hard to determine what's wrong.
0 Kudos
Message 6 of 6
(3,251 Views)