LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code does not work as expected once is made as executable

VI server methods and properties have many characteristics, and one of these is whether or not they will work in the run-time engine.  Generally, anything which modifies code (i.e. scripting) will not work in the run-time engine, because a recompile is needed before running and the run-time engine does not contain a compiler.  If in doubt, look in the LabVIEW help for the property or method and this characteristic will be listed, as there are properties and methods which do not modify code but will not work in the run-time engine.

Message 11 of 15
(680 Views)

Thanks for your answer.

And what if there is the Labview Developper Environement installed on the machine, would it be still possible to have a problem to build an .exe?

0 Kudos
Message 12 of 15
(673 Views)

Thanks for your answer.

 

And what if there is the Labview Developper Environement installed on the machine, would it be still possible to have a problem to build an .exe?

Besides, when you call a VI by propertie node, is this called VI integrated as a dependency of the main one?

Because when I run the main one (in the developpment environnement), everything goes perferctly. But when I build the exe and launch it, a pop up window tells the called VI and its dependencies are being loaded and finally it isn't executable any more. I don't know why.

0 Kudos
Message 13 of 15
(668 Views)

When you build an EXE, it will use the run-time engine, regardless of the presence or absence of a development environment on the machine.  So it is subject to the same limitations.

 

If you call a VI by opening it with Open VI Reference and running it with the Run VI method, there is no dependency in the calling VI.

 

You probably have one of three issues:

 

  1. Something in your dynamically called VI cannot be run in the run-time engine.  If you chain your errors correctly, you should be able to figure this out.  However, this does not usually result in broken code.
  2. Something in your dynamically called VI cannot be found.  This is far more common.  Putting things in an EXE changes their relative paths.  Calling things dynamically from an EXE requires robust code for finding the target items.  You also have to make sure you include everything you need in the EXE.
  3. The machine you are running the EXE on does not have a required driver.  This is easy to fix, once you figure out what driver it is.

I would guess you have problem 2.

Message 14 of 15
(658 Views)

Thank you very much for your help.

I will investigate the second way.

 

Luc

0 Kudos
Message 15 of 15
(647 Views)