Running VI from another VI
HI, I have program1.vi running. When a user clicks on a button, Program2.vi needs to be launched. The way I am doing it now, is by calling Program2 in Program1; so program2 acts as a subVI. But I have a problem here..I dont want my Program1 to be running, when Program2 is called. Also, if i abort Program2, Program1 aborts too. Is there an easy way of running Program2 independent of Program1, though Program1 calls it? I mean aborting Program2 should not cause Program1 to abort and viceversa. Please reply asap. Thanks.
Re: Running VI from another VI
Thanks a lot, I have a question...will this work if I create a exe file of Program1 and run the exe??
Re: Running VI from another VI
Hi Jumarion, Thanks a lot, I have a question...will this work if I create a exe file of Program1 and run the exe??
Re: Running VI from another VI
Hi Zvezdana, I am having some doubts about Event structure. I have a program in which there is a 'while loop' running my devicenet communication. I am both writing and reading some information in this loop. When the user presses a button, I am supposed to give certain type of information to my main while loop executing DeviceNet. This information varies with time, and hence I wrote a Event structure to execute this subroutine. This Event structure, I put it inside another while loop, and placed this alongside the main while loop. Now, when I want to stop the program, the main while loop can be terminated using a boolean control, but the Event continues to run and my program never ends. How can I end the whileloop of the event structure, when I am ending the main while loop. Using a local variable of the boolean control to stop the whileloop of the event, does not work. Please help me get around this problem. Thanks.
Re: Running VI from another VI
Hi Shreesha, it should work, but I only have an FDS edition of LabView so I just can't try it. The thing is that if you've got an exe, you have to give the correct path for program2. This path can be different in debug mode and in an exe file. I didn't really understand what Zvezdana meant : Program 2 has to be open. You only need to tell program1 where is program 2 on the disk and that's all. Hope this helps ! Julien
Re: Running VI from another VI
Julien and Shreesha, What I meant by 'Program 2 has to be open is that Program1 will run Program2 dynamically, but will not open its front panel. Program1 doesn't launch the front panel of Program2, it just runs Program2 in the background. To actually see the Program2 open, and be able to stop it by clicking on the Boolean on its front panel, you have to use the FP.Open property node, or have Program2 front panel opened before clicking on Lauch Progam 2 boolean in Program1. Zvezdana S.