05-18-2010 04:27 PM
Is there any block that functions llike "System Exec" ?
"System Exec" calls only .exe file.
I need a block that can call a Sub-VI.
TQ
05-18-2010 04:40 PM
05-18-2010 04:51 PM
05-18-2010 05:03 PM
Attached are 2 test VIs.
Program3 is the main VI which calls Dialog.
The programm should work as described:
When Enum = wait, nothing happens.
When Enum = Show Dialog, the Dialog.vi will be executed and display the random generated value. Enum's value will then change back to "Wait".
I can then close the dialog.vi and reopen it again by selecting "Show Dialog"
Basically, i need to call the Sub-VI and it must run independently from the Main-VI.
Thank you.
05-18-2010 05:08 PM
05-18-2010 05:20 PM
Check out this thread. There is an example of code that launches a specific vi (from a list) and waits for the vi to complete. When the launched vi finishes control is returned to the main vi
Is that something like what you want ?
05-18-2010 05:34 PM
not really. for my case, the subVI should act like a pop up screen, and run continuously until i close it. And can be call out again when i need it.
in my previous program, my sub Vi is being called and close continuously.
05-18-2010 05:49 PM
Hallo tbob,
i tried using the 1st example that u show me (the one with the case structure). but it doesnt solve my problem, because when i close the sub Vi, i want my main program to continue running. Is that anyway, that when i call the SubVi out and it will run independently as long as my main program is running?
05-18-2010 06:35 PM
fmpfmpf wrote:Hallo tbob,
i tried using the 1st example that u show me (the one with the case structure). but it doesnt solve my problem, because when i close the sub Vi, i want my main program to continue running. Is that anyway, that when i call the SubVi out and it will run independently as long as my main program is running?
You need to mention these things if you want a correct solution. Here is a corrected version of your Program3 vi. You don't really need an enum. You could use a simple boolean switch set to Switch When Released.
05-18-2010 06:45 PM - edited 05-18-2010 06:46 PM
Here is a way to do it with the example I first showed. I don't know why you could not get it to work, it does. I changed your diaglog vi to have a stop button to close its window. Closing the subvi does NOT close the main.