ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Actor Frame's Basic - Launch Actor

Solved!
Go to solution

I have a problem, I have a single "Actor Core". When we use the "Launch Actor" to "Open Actor Core Front Panel", it is possible to know if already "Actor Core" is launched actor, and put forward. I call several times to "Launch Actor", an "Actor Core" every time the call is made, instead opens, I want to have a single "Actor Core", and should be open, bring the front to the front panel. It's possible?

0 Kudos
Message 1 of 2
(3,114 Views)
Solution
Accepted by dgd.gomez

The answer is no - the AF is designed to launch multiple copies of the process. If you want to use a single copy (basically a variation on the singleton pattern, which is a term you can look up), you will need to code this yourself.

 

One simple option is to use a non-reentrant VI. On first call (there's a primitive which returns this) launch the actor and place its enqueuer into a shift register or feedback node. If first call is F, take the enqueuer from the feedback node and send an "open" message to the actor, or simply return its enqueuer.


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