05-13-2014 04:06 PM
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?
Solved! Go to Solution.
05-13-2014 04:14 PM
Can you ask your question again? It is unclear. Particularly "that switches between to vi when execute it gives meeesage".
05-13-2014 04:18 PM
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).
05-13-2014 11:06 PM - edited 05-13-2014 11:31 PM
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
05-13-2014 11:43 PM
Please attach some simplified code that demonstrates the problem.
05-14-2014 01:42 AM
what sort of information you want
05-14-2014 01:57 AM
05-14-2014 05:15 AM
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
05-14-2014 07:06 AM
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
05-14-2014 07:38 AM
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.