Benchtop Measurement and Test
Distributed Measurement and Control
Systems Engineering Software
You can request repair, RMA, schedule calibration, or get technical support. A valid service agreement may be required.
Provides support for NI data acquisition and signal conditioning devices.
Provides support for Ethernet, GPIB, serial, USB, and other types of instruments.
Provides support for NI GPIB controllers and NI embedded controllers with GPIB ports.
This is the demo of the Actor Framework that was shown at NI Week 2011.
The "ACS AF Demo.vi" is broken when opened. I had to set the Fan.lvclass to inherit from the Actor Class for the VI to run.
Is there any documentation on this demo?
The demo needs the Framework to already be installed. Did you already have that installed?
1. I installed the Actor Framework by unzipping the file from Actor Framework, LV 2011 revision (version 2.0.1) to "C:\Program Files\National Instruments\LabVIEW 2011\user.lib\_Frameworks\Actor Framework".
2. When opening the NI Week 2011 Demo the Fan.lvclass does not inherit from the Actor Class.
3. I manually set the Fan.lvclass to inherit from Actor.lvclass which resolved the broken arrow and allowed the demo to run
The block diagrams do not have comments explaning the purpose or architecture. Is there a document which explains the purpose/agenda of this demo project?
Sorry... I forgot about that. Yes, it's the demo -- and it is broken at the start because you're supposed to go through the steps. Originally, we were going to post the video that goes along with that, but the video didn't work out. Really, this demo is only of use if you were at the presentation. The other "offline" demo is documented on the various diagrams.
The purpose of the Alliance Day demo is to demonstrate the ease of working with the framework, which is a little different from showing how to work with things built in the framework. You actually did step 1 of the demo, which was to change its inheritance to inherit from Actor. Let me give you a better outline:
1. When you install and open the demo, you will see two classes, Fan.lvclass and Fan with UI.lvclass. Fan.lvclass is currently broken, because it expects to inherit from Actor, but it is otherwise just a normal, well-formed LabVIEW class. Prove that to yourself by inspecting its methods and attributes.
2. You can turn any LabVIEW class into an actor by simply changing its inheritance. Go to Fan's properties dialog and select the inheritance page. Select Actor from the tree, and then click on " Inherit from Selected" to make Fan inherit from Actor. Select OK to save your changes.
3. You can now launch Fan as an actor. Open ACS AF Demo.vi, and the VI Hiearchy window. Run the demo. A new dynamically linked VI should appear in the hierarchy. This is Fan's Actor.vi. Stop the demo, and the new VI will disappear.
4. Fan with UI adds a user interface to the fan (by overriding Actor Core.vi). Click on the UI/No UI boolean (to select for UI) on ACS AF Demo's front panel, and run the demo again. A fan front panel will appear. None of the controls on this front panel do anything, because we haven't written any messages. Click on Stop on ACS AF Demo to close this panel. (Fan with UI responds to the Stop message, at least!)
5. We can make message classs with the Message Maker tool. Download and install it, if you haven't already (you will need to restart LabVIEW). Launch this tool from Tools>>Message Maker... When the Message Maker appears, select ACS AF Demo from the pulldown list of open projects. Note that one method (Toggle On) is disabled in the tree listing. That's because that message is already written. Highlight the other method names under Fan.lvclass, and select "Build Selected" The tool will build messages for the remaining methods of Fan, and add them to the project. Inspect and close the VIs that were created for you.
6. Now you need to add messages to your UI. Open Fan with UI:Actor Core.vi and inspect its block diagram. Note the event structure in the while loop at the bottom of the diagram. Each message class has a method called Send <method name> Msg.vi. Add that method to the appropriate case of the event structure, and wire it to the queue and front panel control. (They should all be obvious, except for Process Stop Button, which sends the E-Stop message.) Save your changes.
7. Restart ACS AF Demo.vi. Fan with UI's front panel should appear, and the messages should work. You can turn the fan on and off, set its speed and direction, and send it an emergency stop command.
It's a simple demo, really. The Actor Framework 201 Offline Demo shows a lot more about how actors are supposed to work together to make more complex systems. We may post some more demos in the future to illustrate some intermediate concepts.
Could you post this in LV2010?
FraggerFox: You can find an old version of the AF for LV 2010 here. The latest version uses a couple of features that are new in LV 2011. A simple save-for-previous isn't an option in this case since the diagram actually has to be writtten completely differently in previous LV versions. We could manually substitute the 2011 portions for alternate implementations that would work in earlier LV versions, but maintaining multiple copies of the code with slightly different functionality adds weight to something that is only a hobby project of mine, not my actual job (though I keep lobbying to get the AF made official). As we continue to release revised versions of the AF, we're going to stick with LV 2011. Since the vast majority of LV users have automatic upgrade through the SSP, I hope that excludes only a very few from trying this framework.
I was running through your steps nicely until I hit using the message maker tool. Did everything you said, but upon creation, all of the do.vi's in each message class were broken. Stating:
"This VI doesn't match other VIs in the method, Connector Pane Terminal(s) are different. All VIs that implement a method of a LabVIEW class must match Connector Panes. To correct this, compare Connector Pane of both this VI and the VI of an ancestor class that implements this method."
Any insight on this?
Are you using the new version of the framework (3.0.5) that just went up? The message maker works with 2.0 only. We haven't rev'd message maker for 3.0.5 yet. I should probably note that on the READ THIS FIRST page.
To make the Do.vi work, just delete the Send Queue input from the front panel.
Stephen is correct. You can make the same change to the message template (in <LabVIEW 2011>\project\Message Maker\_templates\Message Template\); this should work in the general case.
I will see about an update soon, now that 3.0.5 is up.
What do you need our team of experts to assist you with?
We'll be in touch soon!