Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to build a PPL including Actor classes, messages and AF Debug

Solved!
Go to solution

Btw, since LabVIEW 2019 NI Examples include two additional projects called "Actor Framework as Debug PPL.lvproj" and "Actor Framework as Release PPL.lvproj".

 

No need to implement AF Debug into AF.lib yourself anymore.


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
Message 11 of 25
(2,282 Views)

Is there a guide somewhere on actually using this example? I can create the PPL but how do I convert an existing project to use the new PPL instead of the old stuff (particularly the AF Debug part)?

 

Edit: OK, it appears that if you follow this guide (not the example) you can simply use "Replace with..." and select your new Actor Framework.lvlibp and it's fine, but you need to hold off on the final step of "Replace your backed up AF" until after you convert your old files. The reason is that an existing project that uses AF and AF Debug will use the separate versions of AF and AF Debug by default. If you replace your newly modified files with new ones, all of your old code will still be looking at the standalone AF Debug folder and it won't get pulled in with the Replace With... command.

 

If you leave the modified files there, when you do the Replace With... command, it'll see the modified lvlib file and update the references when you load the file. Then when you do the Replace With... with your new PPL, it'll correctly pull AF Debug and all of the other stuff into the mix.

 

I haven't figured out how to use the example yet as it doesn't include any of the Time Delayed Send Message, Reply Message, etc and doesn't seem to have any reference to the AF Debug folder, so I just used the guide as it is and it seemed to work fine (with the modification of waiting to restore your backups until after you update existing projects).

0 Kudos
Message 12 of 25
(2,013 Views)

There are a couple problems with the stock NI projects to create AF PPLs:

  1. The default builds don't put a space in "Actor Framework.lvlibp" and are instead created as "ActorFramework.lvlibp". This seems small, but the lack of a space breaks the message maker scripting. Fix: Modify the build and put a space in the output filename.
  2. As you've pointed out, Time-Delayed messages and others aren't included. Fix: Use Stefan's instructions instead. (Caveat: Last I checked, this doesn't work with AFDebug enabled. Fix #2, once you've followed the project manipulation steps in Stefan's instructions, also enable the AFDebug project property and do a manual replace of the missing AFDebug VIs before building.)

I really wish NI would just include an AF PPL with the standard install of LabVIEW that has all of these issues resolved so that we don't have to fix everything ourselves.

CLA CLED AF Guild
Message 13 of 25
(1,978 Views)

I know this is an old post but figured I would start here.  I am playing with PPLs and AF, but I can't figure out what I need to do to get the AF Message maker to work with a project that depends on the AF PPL instead of the AF in vi.lib.  Any thoughts on what I may be doing wrong here?

0 Kudos
Message 14 of 25
(711 Views)

If you built it from vi.lib directly, it should "just work" (I think).

 

If you moved it out of vi.lib to avoid borking the initially installed copy, then theres a VI that checks if a class is an Actor (called "Inherits from an Actor.vi", at least in 2019, at <LVDIR>\resource\Framework\Providers\MessageMakerProvider\_Message Maker\_support) and it contains a path constant with vi.lib.

I have to change that path constant to be slightly shorter (i.e. only the directories closer to Actor.lvclass are included in my modified copy)

 

cbutcher_0-1705676895840.png

(I also removed the ActorFramework, because I think I built it from a folder called "Actor Framework" (with a space), but you could rename the directory and keep that part if you preferred).

 


GCentral
Message 15 of 25
(707 Views)

I bet that is it.  I am working on using git submodules as a "package management" solution, and I am turning those submodules into PPLs to make the process simpler.  As such I do have the AF PPL in my local repository as a submodule.  I will have to see what I can come up with as a workaround, as I much prefer keeping the AF PPL with my other submodules than keeping it in vi.lib, especially as I have made a few modifications to it.

0 Kudos
Message 16 of 25
(702 Views)

This solution (my screenshot) works fine for me, but it is a modification you need to make on any computer where you want to use the Message Maker together with the PPL. That's ok for me, but I don't know if it becomes a larger issue for you.

 

I suppose you could build and internally/publicly distribute some sort of package (VIP, maybe?) to modify the VI if it helped, but probably a note with the path to the VI to change is simpler.


GCentral
Message 17 of 25
(698 Views)

I appreciate the screenshot, I will dig in.  I wrote a little tool to manage git interaction and PPL building, I bet I could add a feature to the tool swap between PPL based AF dev and non-PPL based AF dev, especially since my tool is on all the machines that we develop with.  I appreciate the guidance!

0 Kudos
Message 18 of 25
(692 Views)

Did you remove the Actor Framework folder from vi.lib after creating your PPL?

 

The tools rely on templates that link to items in the Actor Framework library.  These templates don't get updated when you move to a PPL.  So, if the library is missing from vi.lib, message generation will fail.

0 Kudos
Message 19 of 25
(663 Views)

@cbutcher wrote:

If you built it from vi.lib directly, it should "just work" (I think).

 

If you moved it out of vi.lib to avoid borking the initially installed copy, then theres a VI that checks if a class is an Actor (called "Inherits from an Actor.vi", at least in 2019, at <LVDIR>\resource\Framework\Providers\MessageMakerProvider\_Message Maker\_support) and it contains a path constant with vi.lib.

I have to change that path constant to be slightly shorter (i.e. only the directories closer to Actor.lvclass are included in my modified copy)

 

cbutcher_0-1705676895840.png

(I also removed the ActorFramework, because I think I built it from a folder called "Actor Framework" (with a space), but you could rename the directory and keep that part if you preferred).

 


I had thought we'd accounted for this sort of redirection in the tooling.  I'll take a look at this at some point.

0 Kudos
Message 20 of 25
(661 Views)