Home Download Register Become an Affiliate Contact
Main Menu
Getting Started
What's New in Version 1.1
Why Active Objects and HSMs?
Universal HSM Template
LabHSM Editor
Getting Started
Tutorials
Included Examples
Links/References

 
 

To install the LabHSM toolkit:
1. Extract all the files preserving the folder structure into a temporary directory on a hard drive.
2. Place the "LabHSM Library" folder into the "\user.lib" folder. This will LabHSM to Functions/User Libraries palette.
3. Place "LabHSM - Loaded VIs.vi" and "LabHSM - Editor.llb" files into the "\project" folder. This will create two new options in the Tools pull-down menu called "LabHSM - Loaded VIs..." and "LabHSM - Editor..." respectively.
4. Place the Examples folder and the documentation wherever it is convenient for you. You can place them in the "\user.lib\LabHSM Library" folder if you want but their presence there is not neccessary for the toolkit to function normally.
5. (Optional) You may want to move or copy LabHSM - HSM Template.vit and LabHSM - HSM Template (no debug code).vit from the "LabHSM Library" folder to the "<LabVIEW>\templates\Frameworks" folder so that they will appear immediately when you select the "New..." on the File menu. If you do not move them, you can always use "Browse for Template..." to find them anyway. A new HSM VI can also be created using the merge vi LabHSM - HSM Template.vi or LabHSM - HSM Template (no debug code).vi, so the VIT is not really necessary at all.

To create a new active object VI based on the HSM template:
1. Create a blank VI. Select "LabHSM - HSM Template.vi" from "Functions/User Libraries/LabHSM palette" and drop it on the block diagram.
2. Save the VI under some name (It must start with "Demo_" if your LabHSM toolkit copy is not registered yet).
3. Launch the LabHSM Editor from the Tools menu.
4. Create a new HSM file in the LabHSM Editor by clicking on the New button or selecting New in the File menu.
5. Save the new HSM file under the same name and in the same folder as the VI you saved in step 2.

That's it! You already have a fully functional event-driven LabVIEW application. Well, it consists of only one active object so far and all it can do is exiting. However, it has all the plumbing code necessary to develop it further to any desirable functionality. While doing that you will work on a higher level of abstraction, thinking in terms of states, events and actions. The best part is that no matter how many times you add or change the functionality, no matter how complex the behavior becomes, the complexity of the code will not change much, because, basically, all that can change is the number of actions!

So, just add your states, events and actions in the LabHSM editor and completely define the behavior of your object there. Then (or at the same time if you wish) add the desired controls and indicators to the front panel and code for your actions into the respective cases of the Processing loop case structure. If you want to capture user events other than clicking on the Exit button and closing the front panel, modify the event structure to throw the necessary events in a way similar to the way it was done for the Exit button.

You may also want to add some shift registers to the processing loop for your frequently accessed data or store (some of) it in external functional (LV2 style) globals.

Use LabHSM template as a wrapper to give "life" and complex event-driven behavior to traditional GOOP objects! Just call their methods in the respective actions.

Turn on LabVIEW context help and hover the mouse over controls in the LabHSM Editor. Their descriptions will provide some additional detailed information on the options you have when describing desired HSM behavior.

Please check out the supplied examples to learn how you can launch or even instantiate other active objects, post messages/events to self and send them between active objects on the same machine or over the network. You will also learn from the examples how to work with external timers which are just - you guessed right! - active objects too, which send messages to yours at the intervals you specify and can change at run time.
 

      Back Next  
Universal HSM Template | LabHSM Editor | Getting Started | Tutorials | Included Examples | Links/References
2004-2005 H View Labs, Inc. All rights reserved.