09-26-2010 10:36 PM
Hi everybody,
how can i run the vi programmatically? i cannot find this "run" function in select class>VI server>vi...
well, i want to use this function in web publishing tool. so i can make the toolbar (run, abort, & vi logo) invisible and run and stop program in my own vi.
thanks for sharing your knowledge...
09-26-2010 11:20 PM - edited 09-26-2010 11:21 PM
It's a method (Invoke Node).
09-27-2010 12:30 AM
hi dennis,
thanks for the help.. but it seems i still cannot figure out how to use it. well, its the first time i will used this function. the error below shows everytime i push the "run" button in menubar. but i cannot make the vi running just by triggering the button i made in the front panel. kindly need your help to figure out this problem of mine.
thanks
09-27-2010 12:43 AM
That makes no sense. You would use the method to run another VI - not the VI where you've placed it (and which is already running). To run a different VI, you need to pass a reference to that other VI by using the Open VI Reference function.
09-27-2010 04:33 AM
Here's a video about VI Server References from an NI R&D engineer.
09-27-2010 10:12 AM
ivel,
The way you are approaching your application will never work. You can't write code in a VI to start that VI running as the code that you right will never be executed. As such a VI can not start itself when a user clicks on a front panel control like a button.
Is it possible that you could have your VI running all the time and clicking the button moves execution from an idle state into an execution state?
Regards,
Simon
09-27-2010 06:59 PM
hi simon,
now i see. thanks for clarifying. my program is quite huge, how can i make an idle state & execution state? thru combination of case structures & while loops? btw, i'm still a beginner in LV programming so i ask you guys for more patience. sometimes i cannot figure out things easily especially when i encountered it in the first time.
thanks,!
09-27-2010 07:02 PM
to dennis,
thanks for explaining the "run VI" function in invoke node. i now figure out but not yet apply its function.
to jcarmody,
thanks for the very useful links!.. i'll go thru that after...
09-27-2010 10:02 PM
@ivel wrote:
hi simon,
now i see. thanks for clarifying. my program is quite huge, how can i make an idle state & execution state? thru combination of case structures & while loops? btw, i'm still a beginner in LV programming so i ask you guys for more patience. sometimes i cannot figure out things easily especially when i encountered it in the first time.
thanks,!
If your progam is "quite huge" and you are asking about how to make an idle and execution state, this tells me that you are not using a good design architecture. I would recommend that you read up on application design patterns, especially the state machine. Note that the design patterns are distributed as templates with LabVIEW, and can be accessed/created via the File -> New... menu item.
10-18-2013 11:19 AM
Your using "TB.Visible" what you should be using is "FP.Open".
This like has some example code for what you want to do.