Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Reentrancy of Actors, and subpanel manager application

Solved!
Go to solution

Hello,

I have a problem that I think relates to reentrancy of actors in my AF application. I have written a program which uses a 'subpanel manager' actor to place instances of actors inside of a subpanel. This works well.

The problem comes when I would like to place an actor instance inside my main subpanel, which also contains a subpanel (and an additional subpanel manager).

I think the problem relates to the fact that my subpanel manager is not fully reentrant (Preallocated clone reentrant execution), however I cannot figure out how to change the reentrancy of my subpanel manager to being fully reentrant without breaking everything.

I have attached a very simple application which demonstrates the functionality.

Parent.lvclass -> main.vi runs the main application. the subpanels are subpanel 1.lvclass, subpanel 2.lvclass, and subpanel 3.lvclass.

After launching main.vi, clicking 'Launch Sub 1' or 'Launch Sub 2' will launch ordinary 'subpanel actors' and place them into the main subpanel using the 'subpanel manager' actor.

'Launch Sub 3' will launch a subpanel actor which contains another subpanel, as well as another 'subpanel manager' within. However when I try to launch new subpanels within 'Sub 3' the subpanels are populated into the wrong subpanel (aka the initial subpanel from the main application).

I have a feeling that the main subpanel manager is being used due to the fact that the reentrancy is not set to preallocated clone reentrant execution on the subpanel manager.

My main question is below:

(1) How can I change my subpanel manager's reentrancy to 'Preallocated clone reentrant execution' without breaking the project?

0 Kudos
Message 1 of 3
(4,493 Views)
Solution
Accepted by topic author mkabatek

You only have one "subPanel.vi" (the one that contains all the subpanels), which both your parent actor and Sub 3 are both using, which is causing your problem.  "subPanel.vi" is preallocate reentrant, but it is called by "subpanelManager:UpdateSubVIs.vi" which in non-reentrant.  So there is only one copy of "subPanel.vi" allocated.

If you modify the manager to dynamically create a clone of "subPanel.vi" for it's own use on startup (using "Open VI Ref") then I think you can make it work.

Message 2 of 3
(3,369 Views)

Thanks, that was it. I updated the OP with the project containing the fixed version for anyone interested.

0 Kudos
Message 3 of 3
(3,369 Views)