LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable a main vi while a sub-vi is running?

I have a vi that calls up two sub-vi's using menu buttons. It is done using a typical state machine setup. When the first sub-vi is running, the main vi is disabled until either the OK or Cancel buttons are selected on the sub-vi. When the second vi is running, the main vi remains sensitive to mouse clicks and jams up the system. How do I set the second vi so that the main vi is disabled until the second vi is closed?

(Apparently the first vi is set up properly with dumb luck.)

I noticed that the first vi has the dark box around the OK button which makes it work off of the enter key without having to use the mouse. The second vi does not. Does this have anything to do with the above problem? If no
t, how is the OK button configured like the first vi?

Property nodes does not seem to be the issue. Property nodes are only used for system initialization in this application.

I am using LabView v6.0, full development.

Thanks,

--- Dave Johnson
--- djpratec@earthlink.net
--- Practical Technologies
0 Kudos
Message 1 of 5
(2,999 Views)
Hi,

There is a solution with VI server. See attachement saved for LabVIEW 6.0.

I hope it will be helpful.
0 Kudos
Message 2 of 5
(2,999 Views)
I needed to set the windows properties to "Modal" to solve the problem. However, your vi example answered another issue I had with using VI Server to switch front panlels. Thank you for your time!
0 Kudos
Message 5 of 5
(2,999 Views)
"dej143" schrieb im Newsbeitrag
news:506500000008000000B3450000-1019262487000@exchange.ni.com...
> ...
> are selected on the sub-vi. When the second vi is running, the main
> vi remains sensitive to mouse clicks and jams up the system. How do I
> set the second vi so that the main vi is disabled until the second vi
> is closed?

You have to set up your second vi as a modal window. Go into the vi-setup,
select window appearance and choose customize.

Henrik
0 Kudos
Message 3 of 5
(2,999 Views)
This is it! Although it may be documented, it's hard to know what to look up for answers. Thank you for your response.
0 Kudos
Message 4 of 5
(2,999 Views)