10-28-2012 11:09 PM
I am trying to use the Start Asynchronous Call Node to open a re-entrant sub-VI in "fire and forget" mode. To get the hang of it, I put together the attached test application. Clicking "Add Channel" in the main VI launches the subVI, passing it a different "ID" for each sub-VI call. The subVI has an "Identify" button which is supposed to open a dialog with its ID, and a stop button which ends the subVI's event loop.
Trouble is that, although the subVI launches fine, none of the front panel buttons are functional. Pushing either one causes it latch, but doesn't release or execute its function (sort of like the Event loop is locked up). The subVI works fine when run independently at the top level.
This seems to be tied to the the fact that the sub-VI is re-entrant. Running this with a single non-re-entrant VI works as expected. Is there something I'm doing wrong?
10-28-2012 11:39 PM - edited 10-28-2012 11:45 PM
edit to delete, (thought I fixed the problem but was mistaken)
10-29-2012 12:12 AM
OK, after looking at some other threads and the Open VI reference help more closely, it looks like the problem was that I had the 0x40 (enable simultaneous calls on re-entrant VIs) option enabled. (0xC0 = 0x80 + 0x40). This creates a reference to the target VI itself, not the clone that actually gets called, so if you pass that reference to FP.Open or to SubPanel.Insert, it will not do the right thing. I will have to think through this a little more before I fully understand it, but changing the Open Reference to simply 0x80 seems to fix things.