01-08-2018 08:33 PM - edited 01-08-2018 08:35 PM
I am writing a program using Actor Framework in LabVIEW 2017. What it does basically is the main VI actor loads the front panel of sub-VI actors to its SubPanel.
The program runs without any problem inside LabVIEW. However, when I build an EXE application, the application can not run and shows an error code of 1307.
I have attached a small project to demonstrate this problem ("AF SubPnl Test").
I think it has something to do with the build specifications because in the example "Feedback Evaporative Cooler" shipped with LabVIEW, it does a similar thing and has no problem at all. However, I couldn't figure it out and need some help. I have also attached the example project. Thanks!
Solved! Go to Solution.
01-08-2018 09:06 PM
I downloaded you code and was able to reproduce what you were seeing.
The issue is that when LabVIEW builds executables, if it thinks that the frontpanel of a vi is not going to be visible, it removes the frontpanel. Because you are calling it dynamically you have to tell the appbuilder to keep the front panel. You can either set the settings for the vi in the build options. Or the easy way is just drop a property node somewhere. Just right click on one of the controls or indicators and drop a visible property node - or pick your favorite and set it to read. I also usually wire the output to something or run an error wire through it, just so the compiler doesn't think it's unnecessary. It's probably not needed. The appbuilder will see the property node and keep the front panel.
I did that and it worked fine.
01-08-2018 09:51 PM
Thanks Taggart. Following your instruction, I unchecked the "Remove front panel" in the Source File Settings of the Build Specifications. And It now works. Thanks again.
01-10-2018 01:52 PM
Glad that helped.
I should mention the one advantage to using the property node method is that then if reuse that actor somewhere else, you don't have to remember to edit the buildspec.
01-16-2018 03:28 PM
Thanks for the note. I've tried both methods and they all work pretty well.
12-29-2018 03:21 AM - edited 12-29-2018 03:23 AM
Hi,Taggart!
I want to thank you for the helpful skills and notes.
When I first compiled an AF program which needed to display the front panel of an Actor Core.vi, I also encountered this problem. At first, I set the "open actor core front panel" to true in “Launch Actor” function, and then an error occurred,Within the help of the forum documentation, I know that the front panel of this display is not suitable for Run Time Engine.
Afterwards, I drop the attribute node method - “FP Open” in Actor Core.vi, but I still need to configure build spec to prevent the App builder to remove the front panel.
The "drop visable property node of one control" method you mentioned is very useful and convenient, and I don't need to worry about build spec. It's very interesting and even magical.
12-29-2018 10:24 AM
Glad you found it useful.
The day LabVIEW stops being magical is the day I find a new profession.