04-28-2015 05:28 AM
I've used earlier versions of the actor framework just fine. Then I installed LabVIEW 2014, and I do not know how the new framework is supposed to function. Is there some example of how nested actors are supposed to work? I've been looking around but actor examples are strangely absent.
04-28-2015 06:14 AM
The old VIs are still there, but the new way is simpler and one of the template projects shipping with LV is an AF project which shows how it's used.
Basically, if you want A to launch B as a nested actor, just call the launch VI and give it A (the actual object) and B. It will automatically give A's enqueuer to B as the caller's enqueuer. It should also register all the nested actors that A has and send them a stop message when A stops.
If you want to launch the nested actor from somewhere else, there's a VI which you can use to send a message to A to tell it to launch B.
04-28-2015 06:27 AM
> but the new way is simpler
Simpler how? I don't see how this roundabout way is simpler.
> one of the template projects shipping with LV is an AF project which shows how it's used.
Nope, not with my version anyway.
> if you want A to launch B as a nested actor
I don't see how that is useful.
> If you want to launch the nested actor from somewhere else, there's a VI which you can use to send a message to A to tell it to launch B.
This is what I want to do, but using that VI I don't get the nested actor's enqueuer back, so it's a bit useless.
04-28-2015 06:43 AM
Besides, the send message VI method is protected anyway, and so can't be called outside of an actor.
04-28-2015 08:09 AM
@LarsM wrote:
> but the new way is simplerSimpler how? I don't see how this roundabout way is simpler.
The simplification has two parts:
I can't say I worked through all the use cases, because I don't have 2014 installed anywhere.
In general, if you want AF discussions, the AF group is the best place, as that also includes the NI people working on it. Here's one example thread also requesting an example - https://decibel.ni.com/content/message/94190#94190
04-29-2015 02:26 AM
> You don't need to call two extra VIs to launch an actor.
Sorry, I don't see how the number of VIs changes.
> Launching becomes easier to understand, because the concept now is that each actor creates its own queue and nested actors have implicit access to their caller's queue. The naming of the enqueuer terminals on the subVI also confused some people (including me) about which enqueuer belongs to which actor and this solves that.
Unfortunately, it seriously mucks up my design. I have a network of actors, and that does not translate to the new VIs. It's not obvious in any case.
> In general, if you want AF discussions, the AF group is the best place, as that also includes the NI people working on it. Here's one example thread also requesting an example - https://decibel.ni.com/content/message/94190#94190
I will look there, thank you.
04-29-2015 09:55 AM
LarsM wrote:
Unfortunately, it seriously mucks up my design. I have a network of actors, and that does not translate to the new VIs. It's not obvious in any case.
I would suggest you post your specific case to the AF group, demonstrating the exact issue with code, because maybe the VIs which were deprecated should be returned to the palettes if there are use cases which need them.