LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using actor framework 2014

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.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 1 of 7
(3,224 Views)

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.


___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(3,212 Views)
> 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.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 3 of 7
(3,208 Views)

Besides, the send message VI method is protected anyway, and so can't be called outside of an actor.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 4 of 7
(3,200 Views)

@LarsM wrote:
> but the new way is simpler
Simpler how? I don't see how this roundabout way is simpler.

The simplification has two parts:

  1. You don't need to call two extra VIs to launch an actor.
  2. 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.

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


___________________
Try to take over the world!
Message 5 of 7
(3,188 Views)

> 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.

 

Lars Melander
Uppsala Database Laboratory, Uppsala University
0 Kudos
Message 6 of 7
(3,166 Views)

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.


___________________
Try to take over the world!
0 Kudos
Message 7 of 7
(3,149 Views)