Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Actor reuse in the same project?

I have created an actor to do a specific function. Now I have been tasked with creating an app to run the function on several DUTs independently while running in parallel in the same App.

What is the best way to reuse that actor I created in 4 instances in the same prject running in  parallel but independent?  the DUTs will be running independently since if one fails i will want to idle that DUT and then restart it once the issue is corrected..

I know I can duplicate the actor but is there a better way to reuse where it is only in one location (for easier debug/feature creep additions)?

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 1 of 4
(3,990 Views)

I have a similar app and what I do is create 5 instances of the child actor using a for loop.  I store each of the message queues for these actors so I can then message each actor separately.

I then use a subpanel in the parent actor to let the user view each of the child actors front panels, if required. It seems to work very nicely.

0 Kudos
Message 2 of 4
(3,122 Views)

You know that actors are, by their nature, reusable - right? You just need to launch as many as you need!

launchMultiple.png

The only thing to watch out for if you intend to run multiple instances in parallel is that any core code in "DUT Actor" does not block, i.e. don't use globals, be careful with shared resources, use reentrant VIs if you need sections to run truely in parallel, ... all that stuff.

Message 3 of 4
(3,122 Views)

Thanks guys!!

I knew they were reusable, just had a mental block of a good way to set them up. Most I have used so far are not duplicated

The for loop sound like a good way for me to set them up as I have to test 24 DUTs at once While they may not be 100% parallel I want them to be able to run roughly at the same time

Jeff D.

Certified Architect LabVIEW Champion DQMH Framework

0 Kudos
Message 4 of 4
(3,122 Views)