Mass Compilers

cancel
Showing results for 
Search instead for 
Did you mean: 

Example Code for Learning LVOOP & the Actor Framework (v2013)

This file does an apples to apples to apples comparison of the same piece of software written with the traditional QMH approach, written with a completely LVOOP approach (Command Pattern, Factory Pattern, Hardware Abstraction), and written with the Actor Framework.  It is not yet well documented, but I plan to improve upon this.  The code is written as an interface to a DMM, and is intended to run the correct DMM driver depending on the DMM present on the system.  I am hoping that this example will be a low barrier to entry for learning both LVOOP and the Actor Framework.  I am planning to put a blog entry together on this code that addresses some of the details, such as how to extend this, or replace the dummy DMM drivers with something useful.  But for now, these things will be left as exercises for the reader.

 

This has been updated to reflect AQ's suggestions below.  The posted code is LV2013, I am working on figuring out how to get both 2013 and 2012 posted...

 

You can find a the LV2012 version of the sample code here: https://forums.ni.com/t5/Mass-Compilers/Example-Code-for-Learning-LVOOP-the-Actor-Framework-v2012/td...

Message 1 of 7
(17,781 Views)

please post it for older labview versions

0 Kudos
Message 2 of 7
(10,529 Views)

I have posted it for 2012.  I could save it back to LV2011 but that would require you to install AF 4.1 for 2011: https://forums.ni.com/t5/Actor-Framework-Documents/AF-4-1-for-LV-2011-user-lib-MAIN-FORK/ta-p/350495...

 

In the meantime I am trying to figure out how to post multiple attachments to an already created document so that I can have multiple versions of the code up for download.

Message 3 of 7
(10,533 Views)

Minor: Instead of wiring True to the Launch Actor.vi, change the VI Properties of your Actor Core.vi to 'Show Front Panel When Called" and "Close Again When Finished". The True won't work in the run time engine.

Minor: All three should use the file dialog to select NI vs Agilent... makes them more parallel for evaluation. For your QMH case, I suggest you put the File Dialog into the Init frame of your event structure and have users just pick a text file named either Agilent.txt or NI.txt. Then pass the name of the file as part of the Init message.

Major: The one person I've shown this to here at work so far (someone I'm trying to convince to use the AF more) immediately stuck on "But I can't see the value that was read by the DMM." Getting the value that is read to appear on the original front panel is important to people. I realize that adds more messaging back and forth, but I think you have to take that step to really show what differs between the three models. (I wouldn't bother with a low or zero coupling implementation. Just send a message for the specific caller.)

Message 4 of 7
(10,533 Views)

Thank you for the feedback AristosQueue, I will make the three changes that you suggested.  I also plan to add some better documentation to the code, this is very much a work in progress at the moment.  The more feedback I get on it the more work I will be willing to do maximize this sample codes usefulness.

0 Kudos
Message 5 of 7
(10,533 Views)

jon, this is an excellent teaching/learning tool by breaking them down to show each implementation, but the same applicaiton.  Many examples, its hard to see why things are donw one way, but yours is easy to compare one to the other.  Thanks for putting it together.

0 Kudos
Message 6 of 7
(10,533 Views)

Ok, I've gone through all the documentation, examples, etc.. to learn the Actor Framework, now I believe am ready to "port" one of my easier projects to Actor Framework and this Measurement Utility looks perfect for teh application, So I use the project wizard to make the new project, open up the  Server UI and try to add the "old" UI functionality to the new Server UI,, and I get stuck in the UI,,, I have not used this architecture so I am basically at a roadblock. Can someone point me to a document on this (new to me) Server UI technique that I’m behind on learning??

Thanks in advance

0 Kudos
Message 7 of 7
(10,533 Views)