LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sub-vi open and close

Solved!
Go to solution

Hi 

I am running a vi and called sub-vi,it can open and do something,but when i quit the sub-vi the was a fault ,how to do with this?

Is the code is wrong?

 

Please someone help

Download All
0 Kudos
Message 1 of 6
(2,245 Views)

Attach the actual VI's, in English.  It looks like there is more to your subVI then your partial screenshot is showing.  The error 1039 says you aborted your VI.  Is that that what you did?

0 Kudos
Message 2 of 6
(2,236 Views)

The sub-vi is to sending the parameter to PLC via OPC ,after changed i click the quit button the sub-vi close the front panel,but in the main vi is the code right?

 

Or what shold i change?

0 Kudos
Message 3 of 6
(2,233 Views)

Here is the VI

Download All
0 Kudos
Message 4 of 6
(2,232 Views)
Solution
Accepted by topic author 314159ym

No.  You should not hit the "quit" button in the subVI.  That shouldn't even be showing in a real application.  A long time ago in the forums, some one said "using the abort button to stop a VI is like stopping your car by hitting a tree, it will stop, but there will be consequences".

 

Why do you have an infinite while loop in that subVI?  I don't know what your boolean buttons are supposed to do since you didn't translate your VI to English.  You should design the subVI so that when the correct action is taken, it stop the loop and allow the subVI to end naturally.

0 Kudos
Message 5 of 6
(2,230 Views)

oK,I found the problem,the sub-vi did not fully closed. NOw it works

Thanks for the replys

0 Kudos
Message 6 of 6
(2,218 Views)