02-17-2011 01:45 AM
hello LV'ers,
I have this problem in my LV program: "I need my subVI to behave like a dialog".
design: If i call this subVI (thru VI server - FPopen of property node), my mainVI should NOT be controlled until the subVI terminates. I believe this is the same as dialog function, once dialog box pops up, we need to deal with it first before we can make controls of our main VI.
my present situation: i have two while loops running in parallel: 1st loop for monitoring data, 2nd loop for menu setting. the subVI that pops up was in the 2nd loop - it pops up when i pushed button (event structure/VIserver). by now, once i called this subVI, i can still click and control my mainVI which should not be happening!
I do think it is very possible, i just dont know how. anyone there who knew this function?
regards,
Solved! Go to Solution.
02-17-2011 02:25 AM
Sub-vi's properties, Windows Appearance, click Dialig.
/Y
02-17-2011 02:27 AM
Hi ivelson,
If you are calling vi using VI server functions, then when you run VI using "Run" method, there you will find option "Wait Until Done", attach True to this node..Then your while loop will stop till your subvi stops executing. But as you are using two while loops, you will have to use local variable as an indication and send other loop in Pause mode.
I guess I made myself clear
02-17-2011 03:20 AM
to Gaurav,
actually, i dont need to pause my 1st loop coz i want to continuously monitor the data..but i dont want it to be controlled neither when my subVI pops up.
in my previous program, i didn't use the runVI function. because my subVI was connected thru wires in the event structure (only called when button was click - where the subVI that will pop up resides).. i just use some property node functions to customize my subVI after it pop-ups.
now that i add the runVI function in my subVI, I receive "error 1000 occured at invoke node...." i guess, its because that subVI is alerady in running mode, so calling runVI function is invalid.
to Yamaeda,
i think you lead me on how to create a dialog-like display.. thanks for the tip!. but i also need the function i wrote in my 1st post (highlighted).
02-17-2011 03:56 AM
Well if you pop a Dialog in the 2nd loop, it'll halt execution until the Dialog closes. If you have a 1st loop which updates values it'll continue to run. Wasn't that what you wanted?
/Y
02-17-2011 04:41 AM
to Yamaeda,
actually, im on d way typing my response to tell that your answer is right.! i thought it was just a dialog-like VI, but after i confirm with sample VI (attached files - i'm on d way making sample VI to clarify my situation when i found out that your comment was the answer!), it also includes the behavior of the dialog. thanks for the solution!...
for others reference, i attached VI to simulate this function. just choose the SUBvi properties - window apperance - dialog - as Yamaeda told, to make the pop-up vi behave as dialog.
million thanks!...