LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically controlling VI's question.

Hi NI,

Is it possible to control subvi's with controls such as boolean
pushbuttons that will dynamically control the subvi's nested 3 or 4
deep?

IE. I am trying to write a GUI for a machine that is extremely
complex. It only needs a few operater pushbuttons and I was hoping
that I could run the whole program as one subvi in a "top gui" VI.

The only problem is pausing the subvi, I have distributed "pause
vi's" through out the main program (basically a while loop that
checks the state of a pushbutton. It has a 500msec time delay
inside.) And I have tunneled the pushbutton through to the top level
subvi. (as a side note, i use a lot of property nodes to this
pushbutton).

Anyway, it doesn't work because the main program
subvi never looks
at the top gui vi's button status until it completely finishes a
full machine run.

Is there any neat way around this problem without having to open up
the machine's main progam vi in the GUI?

The "machine's main program" is a huge subvi, that I haven't had
time to neaten up. I am writing the user interface now and would
like to treat is as just a subvi.

Thanks,

JT
0 Kudos
Message 1 of 2
(2,435 Views)
>> "it doesn't work because the main program subvi
>> never looks at the top gui vi's button status
>> until it completely finishes a full machine run."

Hi JT,

If you wish to retrieve the status of a top VI's control from a sub-VI, you can try passing the reference for such control.

Right click on the control, choose create reference, then pass that reference to the sub-VI. In your sub-VI, you can wire the reference to a property node to get the current value of the control.

Hope this helps,
Dan
0 Kudos
Message 2 of 2
(2,435 Views)