Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Do Actor Frameworks strictly have to be in a project?

Solved!
Go to solution

I've tried creating a power supply libary (with a HAL) and it only requires Voltage, Current, and Protection messages/commands. 

I'd like to place the system in an actor framework and build the messages with the message maker tool, but when I select Actor Framework Message maker, the screen reads: "No Actor Classes Found in this Project".

The drop down menu: "Project to display:" has no options.

The library is not yet installed in a project because I'd like to be able to install the library in *several* projects without having to duplicate code.   

Am I missing something?  Is there a way to create messages decoupled from a project?

0 Kudos
Message 1 of 10
(5,038 Views)

You can have a library (any "project library" file) co-existent in multiple Project Files (.lvproj).

Make one Project File to develop your library, and add the resulting library to the Project File of each project that will use it.

Message 2 of 10
(4,065 Views)
Solution
Accepted by topic author labman04

labman04 wrote:

Is there a way to create messages decoupled from a project?

The automated tools require that the actor be in a project.

You can create message classes by hand, if you want to, but I assure you that will quickly become tedious.  You will also likley find, when you do put that actor into a project, that the project tools won't work correctly with them.  The messages will work fine, but things like message rescripting will likely fail.

There is no reason not to put your actor in a project.  As Brainstorms indicated, you can have the same class or library appear in multiple projects.

As an aside, if you can, I recommend you migrate to LabVIEW 2015 or later.  Tool support for Actor Framework got much better.

0 Kudos
Message 3 of 10
(4,065 Views)

This makes sense. 

Essentially create an lvproj file that stores the power supply library, then create the messages, etc in that project, and when I'm ready to use the file, make sure the messages are in the power supply library and add the power supply library to the specific project.

That's what you're saying, right?

Also: I'm using 2014 now, cant get the higher-ups to sign off on 2015+ (especially since we still have stations running 7.1 ><  )

0 Kudos
Message 4 of 10
(4,065 Views)

Create a .lvlib file (we usually give it the same name as the actor), and add the actor and all of its messages to the library.  Otherwise, yes.

This is a pretty standard way of bundling up an actor and its messages.  It's so common that we made if part of actor creation in LabVIEW 2015.

Message 5 of 10
(4,065 Views)

You can have a library installed in as many projects as you want. Wanting it in many projects is no reason to not have it in at least one project, ESPECIALLY if you're editing it. I cannot imagine EVER working in LabVIEW without a project open. To me, that's such an extreme loss of functionality, I don't even contemplate it. Everyone has different tastes, but I find a taste for working without a project to be surprising.

Message 6 of 10
(4,065 Views)

I do work in projects.  However, I find it, for myself anyways, good practice to work in a library because then I can deal with one component of the overall project at a time with a more effective decoupling. 

Instead of looking at a project where you may have a power supply and a motor and asking "how can I make the power supply interact with this motor?"

I can work in a library containing only the power supply and ask "How can I make the power supply interact with anything that it needs to interact with?"

Working in modules in this way has let me to create many zero coupled programs that I'm in the process of refactoring with Actor framework.  I can take all of my developed pieces and put them together into a comprehensive test routine over the course of several days instead of the weeks it would take writing the specific wrappers for a single test.

0 Kudos
Message 7 of 10
(4,065 Views)

So what stops you from putting your one library in a project file all by itself and developing it as a zero-coupled module that way?

0 Kudos
Message 8 of 10
(4,065 Views)

That was ultimately the answer to the question.  Make a project with a single library and all the messages, then place the library (which contains the messages) into various other projects as needed. 

It makes sense, I was just coming at it from an OOP mentality: "Just create a library with the methods, then add the library" mentality, 

The answers in here have straightened that out.  It's now just a library wrapped in a project. 

Thanks for the hel!!

0 Kudos
Message 9 of 10
(4,065 Views)

labman04 wrote:

Thanks for the hel!!

No problem. I like giving my customers hel. Like this response...

Message 10 of 10
(4,065 Views)