LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

challenge

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 

0 Kudos
Message 1 of 11
(3,908 Views)

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.

Message 2 of 11
(3,905 Views)

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.

Message 3 of 11
(3,902 Views)

sorry but can you expain more please sorry I did notunderstand

merci

0 Kudos
Message 4 of 11
(3,895 Views)

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.

 

 

Message Edited by Dennis Knutson on 01-10-2010 10:37 AM
Message 5 of 11
(3,887 Views)

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

0 Kudos
Message 6 of 11
(3,798 Views)
Which is what I understood and posted.
0 Kudos
Message 7 of 11
(3,793 Views)

If you copy Dennis' code and follow his instructions about run when open, you will get wht you asked for.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 11
(3,791 Views)

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.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 9 of 11
(3,770 Views)

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. Smiley Wink

 

Message 10 of 11
(3,756 Views)