LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I run dynamic reentrant VIs in EXE Applications?

I want to run a dynamic loaded, reentrant untyped VI in an LabVIEW application, generated with the application builder.
I must use the VI function "Run VI" because the VI is used untyped, but when trying to run, LabVIEW returns the error 1013:

    "Cannot load front panel. Make sure you include the front panel of the VI when building a stand-alone application. "

I allready made shure, that the dynamic VI is part of the Application and inside the EXE File. It is definitly loaded into memory.
Curious, in development eniroment, this works fine.

Does anyone know a conclusion or is this a bug? Thanks a lot !



0 Kudos
Message 1 of 16
(4,925 Views)

You wrote

"

It is definitly loaded into memory.
Curious, in development eniroment, this works fine.
"

I will assume the VI path is correct and the VI that is supposed to load the dynamic VI is working correctly and that "False" constant you have wired to your case selector is really true in the EXE.

Because the two fragments of code A) The reentrant loader, and B) The reentrant runner are not tied together via data dependancies, LV can and will compile these two fragments as distinct and attempt to optimize performance by allowing them to execute in paralel. As such, there is no guarentee the loader will run before the runner.
 
So...
1) Make sure your path is correct in your loader,
 
2) Make sure your false is true,
 
3) Use datat dependacies to ensure the loader runs before the runner.
 
Ben

Message Edited by Ben on 10-15-2005 02:34 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 16
(4,910 Views)

Also check the remove FP setting in the builder.

Ben

Message Edited by Ben on 10-15-2005 07:42 PM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 16
(4,900 Views)
Thanks for the tipp, I tried to turn the "Remove Panel" option to "No", but after starting the exe application, it hangs up now... don't know why

The Case structure is correct, it was meaned to load the VI into memory (because the subvi becomes part of the hierachy and gets automatically loaded into memory) but I removed it now to avoid side effects and used conventionell ways with a path.

I did more testing and found out, that this problem occurs only on untyped Refs., reentrant VIs, when using the "Run VI" function.

I put the test results and some explaination to the case structure ;) into the attachment, please watch it, i put some time on it.

I currently have no clue how to get along with this problem.

Karlos.



0 Kudos
Message 4 of 16
(4,886 Views)
Ups... i found some mistakes in the attachment, sorry about that. Here is the correction.
0 Kudos
Message 5 of 16
(4,884 Views)

Hi CleanerTM,

 

I read through your doc and from what you said "I tried to turn the "Remove Panel" option to "No", but after starting the exe application, it hangs up now... don't know why
" that you are no longer dealing with 1013 error.

Since you have a true wired to the "wait until done" the hanging could be correct if the dynamic VI is hung.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 16
(4,878 Views)

The following was posted to Info-LabVIEW about 2 years ago.

This may help.

"


 

Michael,

As far as I can see, you have problem similar to one I met during beta testing. I reported it to NI staff and got rather good clarification. By default, LV7 AppBuilder does not include type definitions and unused instances of polymorphic VIs into executable in order to decrease size of application. If some VI in your exe calls a VI outside (that was not planned by AppBuilder) and uses a type definition in order to pass parameters, you will meet such kind of problem for sure.

I was offered a few ways to solve the problem but I really like only one. There is undocumented ini setting that disables this new feature. Put the following line to your labview.ini file:

BldApp.RemovePolyVIsandTypedefs=False

Then restart LV and rebuild your application.

[ another ways assume explicit including of all VIs into a build project, but it is unapplicable if you need support  plug-ins, for example ]

Hope this helps.

regards,

Konstantin Shifershteyn

"
 
I do not read german (?) but the error message you showed was a result of you doing a "ctrl-alt-del" or did it crash on its own? I am confussed because you used the word "hung" and not crash.
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 16
(4,870 Views)
Sorry, i meaned "crash". This screen appeared by itself.
0 Kudos
Message 8 of 16
(4,869 Views)

Ouch!

Well try the switch mentioned in my previous post.

Otherwise try stripping things down to a minimum and posting a zip of the files required to demo this issue.

Trying to help,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 16
(4,864 Views)
Thank you a lot, I'm thankfull for any help 🙂
I think the programm is mostly stripped down now, ... Files are included into the attachment.

You need to modifiy the .bld files, if you want to play with the options.

I have two tests included: one for typed vi refs (Test 2) and one for untyped vi refs. (Test 1)

0 Kudos
Message 10 of 16
(4,862 Views)