Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Appropriate reentrancy in Message and Actor Core subVIs

fabric: There's no need to create a custom version of the AF to do that. Just select the block diagram contents of your Actor Core other than the Call Parent Node itself and do "Create SubVI". Then make the subVI non-reentrant.

Having said that, David's problem is with the message handling VIs, not with the Actor Core override VIs.

0 Kudos
Message 21 of 26
(1,527 Views)

Hi All;

Sorry for hijack this discussion but I think this one is related to my problem to make Actor Core non-reentrant. Attach is the Evaporative Cooler project which comes with the LabVIEW 2012 example. I have made a Create SubVI in the Actor Core.vi and made it as non-reentrant VI in the Air Cooler Application.lvlib as AristosQueue mentioned above (Actor Core SubVI 2.vi). I need to make non-reentrant for Web Remote Panel application where I only need single instance of that VI. However, it is need not working as expected and the VI could not be closed normally. I have to close the entire project to stop the running VI. Please somebody show me what is wrong with it.

Thanks

DAKBIAS
0 Kudos
Message 22 of 26
(1,527 Views)

Hi,

I tried to run your example but the AF related VIs were broken. After searching for the problem I found that it's easy to solve it.

the "EvaporativeCooler\Air Cooler Application\Air Cooler Application\Actor Core SubVI 2.vi"

was not part of the "Air Cooler Application.lvclass" class.

Just right click on the class in the project explorer and add the file to the class. (-> Add -> File, select your "Actor Core SubVI 2.vi")

After doing this it works for me.

0 Kudos
Message 23 of 26
(1,527 Views)

Hi komorbela;

Thanks for the response. In my computer, the program doesn't have  broken VI and the "Actor Core SubVI 2.vi" is part of the "Air Cooler Application" class. Anyway, thanks for quick fixed.

What I mean is how to make the Actor Core.vi in the "Air Cooler Application" class to be non-reentrant and AristosQueue give an suggestion to "Create SubVI" in the block diagram of the Actor Core.vi. May be I missunderstood the suggestion.

DAKBIAS
0 Kudos
Message 24 of 26
(1,527 Views)

mrutm wrote:

What I mean is how to make the Actor Core.vi in the "Air Cooler Application" class to be non-reentrant and AristosQueue give an suggestion to "Create SubVI" in the block diagram of the Actor Core.vi. May be I missunderstood the suggestion.

When you do "Create SubVI", the new subVI will be reentrant by default (new subVIs take the reentrancy of the diagram from which they were created). Go into the VI Properties of the new subVI and turn off reentrancy.

The Actor Core.vi will still be reentrant, but it will call into a subVI that is not reentrant and in that subVI you'll do all of your ongoing work.

0 Kudos
Message 25 of 26
(1,527 Views)

I have had to add parallel instances of a method that had a PID loop because multiple things were hitting the code and poluting the history of the data it was using.  Changing the VI to shared clone didn't fix it.  Only having a separate instance fixed it.  Additionally I have had some issues with timing and re-entrant code.  If several actors share the same message and have dynamic dispatch of the method and one actor takes a long time to execute its method you can have issues of other actor becoming non-responsive.

As I write this I am realizing that I had made the method re-entrant, but not the Do.vi.  There may be something there to explore.

Casey Lamers


Phoenix, LLC


casey.lamers@phoenixwi.com


CLA, LabVIEW Champion


Check Out the Software Engineering Processes, Architecture, and Design track at NIWeek. 2018 I guarantee you will learn things you can use daily! I will be presenting!

0 Kudos
Message 26 of 26
(1,527 Views)