From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my SubVI freeze my main VI?

Solved!
Go to solution

Could someone look into this VI for me?

 

What this VI is supposed to do is detect of Excel is open, grab what Workbooks are available, and then display them in a listbox. It works as a stand-alone program but my problem is I cannot select any item in the listbox when the VI is called. What am I missing here? VI is in LV 2016.

0 Kudos
Message 1 of 8
(3,673 Views)

With your Front Panel:Open method, you need to wire a TRUE to the Activate input.  It defaults to FALSE, which means it will not open your front panel.


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 2 of 8
(3,644 Views)

That doesn't seem to matter. I am still experiencing the same behavior as before. The SubVI acts like it is in a locked state and I cannot select anything.

0 Kudos
Message 3 of 8
(3,637 Views)

It works just fine for me.  Do you have the subVI open before running the calling VI?  Can you attach a calling VI that causes this issue?


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 4 of 8
(3,633 Views)

Here you go.

0 Kudos
Message 5 of 8
(3,631 Views)

Run the StepperMotor.vi - that is the main VI. I have left it out in this example but you can plunk the GetExcelWBRef.vi in there.

0 Kudos
Message 6 of 8
(3,628 Views)
Solution
Accepted by topic author Eric1977

Just as I suspected.  Your top level VI is set up to be "Modal".  This means it will be in front of any other VIs.  Your subVI is "default", which is basically the same as "floating".  I recommend you change your main VI to be "Floating".


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 7 of 8
(3,622 Views)

I've also been looking at this.  I was a little confused looking at the first VI you posted, wondering (a) why you weren't using the RGT and Excel Objects, (b) how this VI was called, and (c) how some of the input references were being defined.

 

Now that I see the other files included in the Zip, I'm still puzzled.  GetExcelWBRef doesn't seem to be called anywhere.

 

I suppose if you never use it, it doesn't really matter if it works, or not ...

 

Bob Schor

 

P.S. -- a suggestion for Enums used as State Names.  Change the name of the Enum to something like "State" (instead of Control 1).  Also, if you arrange the States in the order they are likely to be called, you can "Rearrange Cases" of your State Machine and use the Sort option, which really helps in "walking through" the code.

0 Kudos
Message 8 of 8
(3,621 Views)