LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Place Run Button on Front Panel

Hi there,
 
I want to run my vi by pressing a RUN button placed on the VI front panel rather than press the Run button
on the toolbar.  Does anyone know how I can connect a Control on the front panel straight to the Run button?
 
Cheers,
Carnot
0 Kudos
Message 1 of 6
(3,119 Views)
Carnot,

it is NOT possible to realize such an application. reason is that the button will only be "queried" when the vi runs. if the vi does not run, pressing the button will do nothing.
so what alternatives are there?
the best (and infact the only i can think of which works really good) is, to set the vi to "run when opened", remove the runbutton in the iconbar. place a button "Start" on your frontpanel. in the blockdiagram, place an event-structure around your whole code and setup a case "Start-button Value changed" which contains the rest of the VI-code. if you want to make the execution of the vi repeatable, you have put a while-loop around the event-structure. please dont forget to create a new case for exiting the vi in the event-structure and bind it to the value change of a "Stop" button.

Norbert B.
NI - Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(3,109 Views)
Although you can not cause a vi to run from itself, you could make a second vi which can dynamically run the first vi.  Remember that there are 2 modes to a vi in the development environment: run and edit/debug.  The development environment can toggle between the two, but in the runtime environment a vi is either running or not.  You will need a running process (another vi or some other running process/server) to toggle an idle vi into the run state and back.  Is there a reason for the vi to have an alternate method to be started?
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 6
(3,106 Views)
falkpl,

Is there a reason for the vi to have an alternate method to be started?
i dont quite understand your question. so i answer the question which i understood: "why are there two conditions of a vi in the developement system?"
there is a KB for this: KB:
How Can I Set My VIs to Open in Run or Edit Mode?
hope this clears things up.

Norbert B.
NI - Germany

Message Edited by Norbert B on 09-14-2005 09:12 AM

Message Edited by Norbert B on 09-14-2005 09:13 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(3,102 Views)

Hi Norbert and Falkpl,

Just chkd your posts.  Thank you.  But I started and was trying in the lines of what Norbert's saying in the first post.  I'm using a Case structure and controlling it from the outside with a Boolean and it's working, though you can't explicitly ctl the Run button from outside.  I do not know about the Event structure though but I'll try that soon.  Yeah I've also chkd the vi to start in Run mode when it's opened.  Cheers anyway, but anything more than that would be much appreaciated.

0 Kudos
Message 5 of 6
(3,084 Views)
Carnot,

maybe this clears things up a bit....

Norbert B.
NI - Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(3,055 Views)