Published August 2, 2016

The Monitored Actor Toolkit has been a staple of Actor Framework based development at MGI. It gives us the insight into our application that we need to visualize and debug our actors. We thought the monitored actor was missing a few things, so we made some changes. This new version is 100% compatible with the previous version. Simply update the monitored actor package to get the benefits.

Classic Features

First, all of the features of the original monitored actor are preserved.

An example of a running application.

The main goal of monitored actor is to give developers a way to visualize the actors running in the system. From this window you can still stop actors and show their actor cores. This window still shows only in the development environment (by default).

The New Stuff

Actor Labels

Actors can now have labels. This is a field that you can use to help distinguish actors in the monitor window. This is especially helpful if you have several of the same actor running. Just set the label for each one, and you’ll be able to easily see what’s what.

Write Actor Label.vi

Message Logging

All messages sent to a monitored actor can be logged. Simply right click on an actor in the monitored actor window and select “Enable Message Log”

Orphan Detection

One of the most frustrating aspects of actor development is when you forget to stop a helper loop in an actor. Your libraries will be locked, but it will seem like your code has finished executing. Previously, these actors would be removed from the Actor Monitor window and left for the developer to figure out.

Now these actors will be added to the orphan detector. From here you can double click on the actor to see its running Actor core.vi. From here you can debug and manually abort your actor as needed. No more closing the project to abort background VIs!

Overriding the Actor Monitor User Interface

The Monitored Actor library has been re-factored in a configurable and expandable way. This allows you to do a couple of things:

  • Pass configuration parameters to the Actor Monitor
  • Override the Actor Monitor User interface
  • Run the Actor Monitor Window in the runtime environment

It’s now possible to do cool things like run the actor monitor in a web service, so all you need to debug the system is a web browser. Or maybe you want to log the actor info to file when in the runtime, but in development mode you want the normal monitored actor window. Previously, it was impossible to disable the monitor when using Packed Project Libraries (this was because of the way conditional disables are evaluated when building PPLs). This is now possible.

An example of a web based Monitored Actor User Interface.

Download the MGI Monitored Actor Toolkit from the NI Tools Network. Search for Monitored Actor in VIPM