01-10-2010 11:02 AM
hi
how can I start running a program with out pressing the run or ctrl r but by pressing a boolean control on the front pannel.
merci
01-10-2010 11:06 AM
Not very descriptive subject.
Your question is asked all of the time. Set the VI properties to run when opened. Then you can use an event structure, have a start state in a state machine, or most basic, just a while loop outside the main loop.
01-10-2010 11:09 AM
This is not a challenge. It's simply a silly request. It's like asking the same question in Visual Studio, as in, how do I start the application by pressing a button on my form designer. The answer is, you can't, unless you do something really crazy, like make an XControl.
Now, if you're talking about having the VI automatically run when opened, that's a different story. In that case, do what Dennis said.
01-10-2010 11:25 AM
sorry but can you expain more please sorry I did notunderstand
merci
01-10-2010 11:37 AM - edited 01-10-2010 11:37 AM
Select File>VI Properties, go to the Execution category and select 'Run when opened'. How to have a 'Run' Boolean will depend on your code. The simple option is shown below.
01-11-2010 01:24 PM
well i think that you got my idea wrong well i intended to run the vi with out pressing the run button nor ctrl r but by just pressing a boolean variable on the front panell
thank you very much
merci
01-11-2010 01:29 PM
01-11-2010 01:30 PM
If you copy Dennis' code and follow his instructions about run when open, you will get wht you asked for.
Ben
01-11-2010 01:52 PM
If what you are asking is whether there is a way to start your LabVIEW VI running from a non-running condition using a boolean rather than the "run arrow", the answer is no. What Dennis has said and shown allows you to have a LabVIEW vi that, when you click on the vi filename or icon in the directory, will open the front panel, start it running, but not execute any of your code until the boolean is pressed. You can't launch LabVIEW into a running state (which is what the run arrow/ Ctrl-R does) with a front panel control, because it isn't read until LabVIEW is running.
01-11-2010 02:00 PM
LV_Pro wrote:If what you are asking is whether there is a way to start your LabVIEW VI running from a non-running condition using a boolean rather than the "run arrow", the answer is no.
Unless you employ the trick of the XControl, as altenbach had shown, and as he correctly summarized as simply being a silly solution to a non-problem.
LV_Pro wrote:You can't launch LabVIEW into a running state (which is what the run arrow/ Ctrl-R does) with a front panel control, because it isn't read until LabVIEW is running.
Technically, LabVIEW is already running. It's the VI that needs to be running.