LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my SubVI freeze my main VI?

Solved!
Go to solution
Highlighted

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
(1,194 Views)

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


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2 of 8
(1,165 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
(1,158 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?


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 4 of 8
(1,154 Views)

Here you go.

0 Kudos
Message 5 of 8
(1,152 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
(1,149 Views)
Solution
Accepted by topic author Eric1977
10-25-2016 01:46 PM

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".


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 7 of 8
(1,143 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
(1,142 Views)