LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run-vi method and how to use it

Hi,

What I am trying to do is put a start button on the front panel of my vi. When clicked, it should act the same way as the "Run" button on the menubar, and simply start the vi.
This proved to be a more complex matter than I would have guessed. I think I need to use the run-vi method, but I'm not sure how to work with refnums, etc.

Thanks!
0 Kudos
Message 1 of 3
(2,760 Views)

The run vi is so a vi can call another vi.  I dont think you can call a run to a self vi because you would need to be running inorder to execute the run command.  The run command is very useful in dynamic function calls subvi pannels and a few other cases.  To use the run vi, open a reference a vi (use open reference and pass the path of the vi), and pass the reference to the run function.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 3
(2,750 Views)
And to do what you want, you should run the VI, but place a piece of code at the beginning which waits for you to click your own run button, like a while loop or an event structure.

___________________
Try to take over the world!
Message 3 of 3
(2,744 Views)