labview >> Using button to control subVI.

by lihui » Mon, 16 Feb 2004 09:34:20 GMT

Can i use a button in my main front panel to break out of a while loop
in the subVI during execution?

labview >> Using button to control subVI.

by lihui » Mon, 16 Feb 2004 20:27:59 GMT


Thank you very much, Chris.
May i ask u if there is anyway to disable the button first until
certain execution is executed, before releasing it to the user?
Im actually working on a project that manipulate data across gpib. If
the user press the button to early, certain data will not be received.

labview >> Using button to control subVI.

by Chris_de » Mon, 16 Feb 2004 20:48:41 GMT

You can disable or hide the button using a Property node, and than
activate or show after a certain execution.

labview >> Using button to control subVI.

by lihui » Thu, 19 Feb 2004 11:09:43 GMT

How is it done? Sorry to trouble you.Im pretty new in this.
Can you show me a sample prog?
thanks again.

Similar Threads

1. how to pass stop button's boolean value to subvi's subvi

There is a stop button on my main vi and the boolean value could be
passed to subvi using control reference. So the subvi could stop when
the stop button on main vi's front panel is pressed. My question is
how I can pass that boolean value to nested subvi, so once the stop
button in main vi is pressed, all nested subvi stop?

Thanks.

2. control two functions using a button

3. get main vi control or indicator from subvi using cluster reference

4. To replace the Run button on toolbar to a user control Start button

5. run a subvi by pressing a button multiple times

Hi,

You have to run it dynamically, with the Run VI method. This method can
optionally wait or not. Before running the VI, you have to set the controls
with the method Set Control Value (or Set Control Value [Variant]).

There are several ways to read back values from dynamically started VI's.
One is to use a buffer (lv2 global). Another is to use the Get Control Value
method.

It's complicated, but if you put all this code in a sub vi, you'll end up
with a nice main...

Regards,

Wiebe.


"smal" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...
> Hi
> I wanted to run a subvi each time the user pushes a button.
> So the subvi might be called multiple times & different instances of
> the subvi run simultanously with their front panels open.
> To do this I made a .vit & call it by refrence wehenever a button is
> pressed but it doesn't work.For the first time it opens but it seems
> as if the .vit doesn't return after it is called. while if I use the
> same method & call the .vit by reference 2 times in parallel both of
> the front panels open without problem.
>
> How can I solve this problem(the main & the subvi are attached LV
> 7.0).
>
> Thanks for your attention in advance


6. closing subvi with a button?

7. Show/hide mainVI button in subVI loop

Lihui:

From your sub-vi, you can et Control Value?of a Boolean
idebutton?(just for the lack of better names) in main.vi to true
using vi property node. (Or you can also write to a global variable
that can be accessed in main.vi)
In the main.vi, you can wire it to a case structure (or better yet to
a dynamics events structure in LabVIEW 7.0), which has the property
node/visible set to false inside it. When Boolean hide button is set
to true, you will be able to hide the button. You could set visible to
true in when boolean "hidebutton" is false as well if it's convinient
for you

I hope this helps,

FightOnSCTrojan

8. Connection for subvi and button