LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure not calling VI

Solved!
Go to solution

I am new with labview and I am updating a code that was written with labview 5.. I am having troubles with case structures not calling sub VIs. I have added the "Source size calculation" button to the menu cluster but when it is selected in the case structure it does not execute. All of the existing buttons work fine (and have been removed from the other cases of the case structure), but not the one I added. I have selected "Run when opened" in VI Properties>Execution. I have also tried other sample VIs in the case strucutre but they also do no execute when selected. Any suggestions are appreciated!

Download All
0 Kudos
Message 1 of 5
(2,904 Views)

You probably should start with some simple tutorials.

  • Your subVI has no inputs or outputs defined and completes in nanoseconds. What is it supposed to do?
  • "Quit labVIEW" seems completely pointless.
  • Why do you need to negate the boolean twice? Just swap the cases and change the termination condition to "stop of true" instead. In any case, you only need one case structure. You already have case for "5".
0 Kudos
Message 2 of 5
(2,888 Views)
Solution
Accepted by gbr4dley

My first recommendation is to rewrite this code using an Event Structure.  It will make your life A LOT easier.

 

Secondly, it is generally not a good idea to have a VI "run when opened".  If you need something to just run, you need to build it into an executable.

 

Thirdly, your subVI is not set up to show its front panel when it is called.  Go into the VI Properties and then the Window Appearance section.  If you customize, you will see the options to open front panel when called and to close it when complete.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(2,884 Views)

The subVI is just an example VI, not the actual code that will be in there. But, all I want the case structure to do is to open the VI when it is selected.

0 Kudos
Message 4 of 5
(2,882 Views)

Right-click the subVI, select "subVI node setup" and select "show front panel when called".

Message 5 of 5
(2,878 Views)