LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hi,
I'm using LabView 7.0, I'm facing problems to replace the Run button in Toolbar to a user control button in the front panel or create an alternate user control button to Run button which when pressed directly executes the application( i.e it does the work of Run button ).

As i could not find much resources on NI website I have no idea how to solve this. If possible mail me an example code.
Plz help me.
Thanks in advance
sayaf
0 Kudos
Message 1 of 8
(3,455 Views)
This will not work. Your button will not do anything until the VI is actually already running.

You have several other possibilities, for example: Set the VI to "run when opened" and simply execute a wait loop until the special button is pressed. Then execute the main code.
0 Kudos
Message 2 of 8
(3,449 Views)
Thanks for the reply,
If this is not possible, then as you said if I implement 'run when opened' condition then can I modify/change the controls before the actual execution starts i.e before pressing my 'Start' execution button.

Thanks again
sayaf.
0 Kudos
Message 3 of 8
(3,443 Views)
It would be possible to write a small VI with a "Start" button on the front panel which, when run will load the VI you may wish to change. By opening the VI without running it, you can change whatever you wish (While the first VI is still running of course).

Then, when you're ready, you can press the "start" button on the first VI's front panel to run the second VI.

It's a bit cludgy, but is should work OK.

You'll need to use some VI server calls for this, so if you're not faminiar with them, let us know.

The only thing about all of this is that the "original" run button within LV won't disappear with this method as far as I know.

Hope this helps

Shane.

PS IF you are just looking to change the VALUES of controls before running, Altenbach's version is correct. In this case you simply have to keep all your controls in a while loop waiting for the start button before passing the new values to the rest of the block diagram (See the example attached). If you actually want to EDIT the VI, you'll need one of the other more complicated approaches.

Message Edited by shoneill on 05-13-2005 11:09 AM

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 4 of 8
(3,442 Views)
Thanks for the information,
But the attached VI works after pressing run button, this is not required as I want the application to run in background when it is opened & later after making necessary changes on the controls in the front panel, the user can start his actual execution process.
I don't about vi server calls, plz provide more detaiils how to use them
Thanks again
sayaf
0 Kudos
Message 5 of 8
(3,433 Views)
If you save the example I provided as "run when opened" (Which I forgot to do, sorry) it will run as soon as it's opened, but the execution will only really start after you push the button on the front panel.

sorry for the mistake. Here's the correct version to save you the bother.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 6 of 8
(3,428 Views)
Its Ok, I already modified & executed the example with 'run when opened' condition but If i want to run this application for the second time without closing(exiting) the application then again I have to use the Run button on the Toolbar instead of the Ok button to start execution which i don't want.
Any solution to this.
0 Kudos
Message 7 of 8
(3,424 Views)
Here you go.

It seems that a LabVIEW course might be something you should look into. Another alternative would be to go through the tutorials provided with LV.

Hope this helps

Shane.

Message Edited by shoneill on 05-13-2005 12:04 PM

Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 8 of 8
(3,420 Views)