Are You Taking Advantage of the Actor Framework?

Monday, June 23, 2014

Your assignment: Write a UI that controls multiple separate pieces of hardware. Users will click buttons to start ongoing processes on the various hardware targets. The UI needs to display ongoing status updates from the hardware as it works. The UI must also be able to interrupt the current task to send new instructions. New hardware may be added dynamically. An emergency stop button needs to quickly shut down the whole system. Make it fault tolerant, free of race conditions, and easy to document.


Many LabVIEW users with multiple parallel test benches or complex industrial control systems must complete that assignment. LabVIEW is up to the challenge, but it is not an easy challenge in any language. The Actor Framework, first included with LabVIEW 2012, aims to make a really hard problem merely difficult. The Actor Framework template projects in LabVIEW 2013 aim to give even a novice a roadmap, somewhat long, to fulfilling the assignment.


The Actor Framework was designed with lots of feedback from LabVIEW users. It takes the general idea of parallel queued message handlers (QMH) and hides all the implementation details, reducing the interface down to this idea: Write a LabVIEW class that defines your actor and all the operations it can do, then launch a VI that manages an instance of that actor class and talk to/from the actor by sending messages (defined by additional classes) via a pair of priority queues.




The framework handles queue shutdown order, checks for message type safety and encourages an architecture that avoids common deadlocks and race conditions. It lets you reuse more code than typical QMH setups.


In LabVIEW 2013, create a new project using the Actor Framework template and read the documentation in your new project to learn how the Actor Framework works. Like all templates, use the Bookmark Manager (View >> Bookmark Manager) to find all instances of #CodeNeeded and #CodeRecommended to fill in the template. With patience, you can join the ranks of the many programmers who have used AF to conquer this difficult challenge.


It’s not a silver bullet. It’s a tool to make a hard job manageable. The framework continues to evolve through community participation. In LabVIEW 2014, look for small changes aimed specifically at making the Actor Framework even easier to learn.


If you have questions or wish to share your story of massively parallel development, find the community online at