LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Main VI disabled when running sub VI

Solved!
Go to solution

I have a main VI (the user interface) with a tab window that can run different experiments by calling different subVI's. Each experiment is on a different tab page, and while the subVI for that experiment is doing its data acquisition, I want the results to show on the tab page on the main VI. I have not set the subVI's to show their front panels when called, as I would like everything to be viewed and controlled on the main VI.

 

I have used refnums to allow the stop boolean button on the main VI to be read while the subVI is running (the subVI will continuously acquire data until it is stopped by the stop boolean button). However, my problem is that the main VI seems to be disabled once I run the subVI. It's not that the refnum does not register the boolean button being pressed, it's that I can't even press that boolean button on the main VI.

 

I've tried this refnum method with a very simple main VI - subVI combination where the subVI is simply generating random numbers in a while loop, refnums it to the main VI to display the number, and a stop button on the main VI can stop the while loop in the subVI. It works, so I'm pretty sure I'm not doing anything wrong there. I really don't understand why this isn't working in my experiment user interface 😞

 

I've attached the main VI and one of the subVI's in question. In the main VI, this subVI is called when the button "Monitor PMT" is pressed and the event generated. The event is #3 in the main VI event structure. (ps. I know the waveform chart in the event isn't doing what it's supposed to be doing, as it's not in a loop. Still figuring out how to get it to loop at the same time as the subVI data acquired.)

 

The instrument this program is interfacing to is a SR400 photon counter. An Arduino Uno board is also interfaced in the other events, but not this particular one.

 

Any advice at all would be much appreciated. Thank you!

Download All
0 Kudos
Message 1 of 5
(3,092 Views)
Solution
Accepted by topic author janie128

All your events are set to lock the front panel until the event completes. Since completing an event (i.e. stopping the subVI) requires user intereaction you are deadlocked).

 

(Please DON'T attach VIs where the diagram and front panel are all set to be maximized to the screen. That is very, very annoying!)

Message 2 of 5
(3,070 Views)

(Please DON'T attach VIs where the diagram and front panel are all set to be maximized to the screen. That is very, very annoying!)


 

Can you explain? You're not talking about the run-time position right?

0 Kudos
Message 3 of 5
(3,057 Views)

@Gregory wrote:

(Please DON'T attach VIs where the diagram and front panel are all set to be maximized to the screen. That is very, very annoying!)


 

Can you explain? You're not talking about the run-time position right?


All the VIs attached above open maximized to the screen, meaning they fill my entire 2560x1440 screen with mostly whitepace and a little bit of code. In order to efficiently work on programs, the pane and diagram should be sized just sufficiently for their contents so we can effectively work. It is not useful if we can only see exactly one diagram or one front panel while everything else is hidden. LabVIEW programmers use parallel operations! Let's not waste 80% of the pixels to display useless information.

0 Kudos
Message 4 of 5
(3,048 Views)

Thank you so much! That solved the problem! I didn't realize that function existed at all, I guess it's just a default setting.

 

Sorry about the maximized windows. I personally prefer working with maximized windows and didn't realize that would be inefficient and annoying to others. I'll remember that in the future if I ever have to post a vi again.

 

Thanks again for your help!

0 Kudos
Message 5 of 5
(3,025 Views)