Simply configure the Vi to run when openend.
Write it as a event driven state machine that always runs and closes when you're done.
(Users of your program should not need to learn LabVIEW specific procedures such as operating the toolbar. Hide it during runs!)
Don't get me wrong, you can do this in LabVIEW, but it's silly. There is no need for it.
Have a look at the attached code (LV 8.5) that I wrote quite a while ago to demonstrate the idea. Unzip all into one folder, open autostart.vi, and click the button on the front panel. It is just a quick draft and would need significantly more work to be even generally useable.
This is a silly little example that shows how one could use an Xcontrol to run a VI via a front panel button.
Make sure everything is inside the same folder, then open autostart.vi in LabVIEW.
Pressing the button on the FP runs the VI.
OMG!! are serious, isn't there a simpler code????????? Do you need all these sub VIs?? BTW, i wish u cld help me in this, how can i keep the value in the string indicator WITH releasing the 4 buttons. As in, i have 4 buttons, if i press one of them, it keeps pressed and the value remains indicated, if the button is released, the value disappears.
Please see the VI if you have time.
Darn, i meant numeric indicator, u see when u add convert array to number, it gave me 1 for up, 2 for dow, 4 for left and 8 for right... how can i fix these values??
Values 1, 2, 4, 8 are not broken. So why do you want to "fix" them?
(There are 16 possible combinations if you allow multiple buttons to be true).