LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I want to execute a vi which has a switch that switches between to vi when execute it gives meeesage that the top level VI stopped for unknown

Solved!
Go to solution

I want to execute a vi which has a switch that switches between to vi when execute it gives meeesage that the top level VI stopped for unknown 

what to do? 

0 Kudos
Message 1 of 11
(4,119 Views)

Can you ask your question again?  It is unclear.  Particularly "that switches between to vi when execute it gives meeesage".

0 Kudos
Message 2 of 11
(4,113 Views)

Please keep the subject line short, but  make the body of the posts a little more rich in content.

 

So you have a VI that, when executed, behaves in an unexpected way. (if I understand correctly).

  • Who wrote the VI?
  • Who operates the switch?
  • Do you have more information?
  • Can you attach the VI?
  • Where is the toplevel VI?
0 Kudos
Message 3 of 11
(4,108 Views)

I have created 2 VI and I want both to be in one VI so I made a case structure and put the 2 vi in it , the case is conected to a switch 

( if I choose true vi 1 open , if I choose false vi 2 open)

when going to esecute by building exe it completes wothout error but when lunching it  a message appeat told me the " the top levl VI stopped for unknown) 

 

 

what I have to do 

Download All
0 Kudos
Message 4 of 11
(4,080 Views)

Please attach some simplified code that demonstrates the problem.

0 Kudos
Message 5 of 11
(4,062 Views)

what sort of information you want 

0 Kudos
Message 6 of 11
(4,043 Views)

@bisso92 wrote:

what sort of information you want 


See the post right above yours.

0 Kudos
Message 7 of 11
(4,033 Views)

Dear Sir,

 

I am not clear about your question. I will write down my interpretation.

You have 3 VIs - 1 main.vi and 2 subVIs. You are calling the subVIs in the main VI. The state of a boolean control chooses which VI opens. You have used a case structure to do this.

Such a logic would work fine by using a case structure. I am attaching a simple example to do the same. 

 

Now in your case, if your program does not behave as you expect, kindly try to debug it. Use 'single stepping' or 'highlight execution' to find out the source of the error.

 

If you have encountered any error, kindly post a snapshot of the same.

 

Regards,

Amit Yadav

Application Engineer

National Instruments

 

 

 

 

Download All
0 Kudos
Message 8 of 11
(4,010 Views)

yes you are right but I want the front panel to be seen when called up 

the vi works good but when I try to execute it to exe file it gives me this error 

0 Kudos
Message 9 of 11
(3,991 Views)
Solution
Accepted by topic author bisso92

bisso92,

 

you need to be more specific...  When you say that you want the front panel to be visible when called, I suspect you mean the sub-vi.  You can go into menu:

 

File > VI Properties then select Window Appearance, followed by Customize and select "Show Front Panel When Called".  You can also select close afterwards, if originally closed.

 

There are other "tricks", such as embedding the subpanel within your main VI, that way you see both. 

 

Normally, a Main VI (or main function in other languages), would always present so that the operator can carry out other operations.  If so you should look at using an Event Structure with a Producer / Consumer arrangement, where the consumer loop has the case structure where the sub-vis reside.

 

To learn more about LabVIEW, I suggest you try looking at some of these tutorials.

Message 10 of 11
(3,977 Views)