Showing results for 
Search instead for 
Did you mean: 

Trouble inserting VI into a subpanel

Go to solution

I'm having trouble launching an asynchronous VI into a subpanel. Shouldn't this code create a shared clone (of my Static VI) and put it in my Panel? Instead, the "original" appears in the Panel, and the clone launches in the background. There are no errors at the end. I know I'm leaking refs in this debug snippet, but don't think it should affect this.




0 Kudos
Message 1 of 5

Don't use the 0x40 flag (so use 0x80 rather than 0xC0).  It is common to think that 0x40 is needed for "Multiple clones" when it actual means the variation "Clone Pool".

0 Kudos
Message 2 of 5

Thank you, dropping the 0x40 flag fixed my issue, but I can't say I understand why.


My VI is set for shared clone reentrancy, so wouldn't I want to use the clone pool? The help docs say option 0x40 will "enable simultaneous calls on reentrant VIs", and is for "multiple ... Start Asynchronous Call nodes to execute clones of a reentrant target in parallel". These seem like what I'm trying to do.


And tried to copy the Actor Framework's approach to launching Actor Core, which is how I arrived at 0xC0 and shared reentrancy. Obviously the AF works perfectly well, so there must be something I'm misunderstanding about reentrancy, clone pools, and the Open VI options.

0 Kudos
Message 3 of 5
Accepted by topic author OneOfTheDans

Without 0x40, Open VI Ref creates a clone and returns a VI reference to that specific clone.  You can use that reference to put that specific clone in a subpanel. 


With 0x40, the reference isn't pointing to a specific clone; it points to the entire pool of many clones.  When calling that pool, an available clone is used, but because the reference is not pointing to any specific clone, you can't use this reference to operate on any of the running clones.


Like the AF, I only use 0x40 myself, but if I need an actual reference to the clone I have started running, I need to get that reference a different way (such as having the clone itself pass back it's "This VI" reference).

Message 4 of 5

Excellent explanation, thank you, now it makes sense!

0 Kudos
Message 5 of 5