08-21-2009 10:09 AM
I have a sub vi with Reentrant execution, and it has recursive call on some cases.
It is very similar to OpenG VI “Read Key (Variant)__ogtk.vi”, my sub vi works without any problem unit LabVIEW’s Two Button Dialog is opened in other process loop.
I have attached a Test VI, and would like to understand why would Loop 1’s Dialog box have any execution impact on Loop 2’s process?
Why Open VI Reference Function won’t execute when Two Button Dialog is opened in other process?
LabVIEW version 8.6
Thanks,
08-21-2009 12:12 PM - edited 08-21-2009 12:15 PM
LabVIEW's native dialog box is Modal. It will not let anything else run which requires (or MAY require) user input. In the case of your code, LabVIEW can't open a VI with a modal process going.
You can achieve the same result by replacing the dialog box with a string indicator on the panel {"are you sure you want to stop?"} and buttons {Yes, No} (these can programmatically appear when the user hits stop).
To get your demo to work as-is, simply replace the Call By Reference Node and the Open and Close with the actual reentrant VI. Note that you could even set it to Open when Called (ad close later) and it will still work (although it would be ugly) because LabVIEW's compiler knows the VI requires no user input.
08-21-2009 12:38 PM
Broken Arrow wrote:LabVIEW's native dialog box is Modal. It will not let anything else run which requires (or MAY require) user input. In the case of your code, LabVIEW can't open a VI with a modal process going.
Broken Arrow thanks for your reply, but not sure if I understand Modal dialog box would cause the problem.
I already had a work around by using Three Button Dialog VI, and it is s Modal VI.
I would still like to understand, why would DataFlow halt at Open VI Reference Function in Loop 2 when I use when Two Button Dialog?
08-21-2009 02:29 PM
This is better representation of my recursive call VI.
I would still like to understand, why would DataFlow halt at Open VI Reference Function in Number++.vi in Loop 2 when I use when Two Button Dialog?
Thanks
08-25-2009 05:01 PM
Good Evening lvABC,
One thing to observe is that the Two Button Dialog is a LabVIEW primitive whereas the Three Button Dialog is simply a VI.
Though older, here is a similar thread.
Why does Open VI Ref wait for One Button Dialog?
http://forums.ni.com/ni/board/message?board.id=170&message.id=210652