psychomanu Posted October 14, 2004 Report Share Posted October 14, 2004 Hi all, I use the VI server to call the VI method 'make current values default' to store some control values for the next time the vi is launched. This works fine, but when I build an executable I get "Error 1044 occurred at Invoke Node in...." and the possible reason "VI is locked". Of course there is no vi anymore. Is there more functionality that cannot be compiled to an executable? Is there a workaraound in my particular case besides the obvious configuration file or ini file? Thanks. Quote Link to comment
FLX Posted October 14, 2004 Report Share Posted October 14, 2004 Hi, if I have this problem i tend to create a start up exe. This executable only starts my main VI. The disadvantage is you have more files (all VIs) and not only the exe. Quote Link to comment
psychomanu Posted October 14, 2004 Author Report Share Posted October 14, 2004 Hi, the intention is to distribute this application to PCs without Labview on it, so everything needs to be in the exe. Thanks for the reply, Manu. Quote Link to comment
FLX Posted October 14, 2004 Report Share Posted October 14, 2004 You do not need LabVIEW installed if you call a VI in you exe with VI server. You need only all VIs available at your PC and the LV runtime installed. The VIs can be locked. But you are right if you think this is not a good distribution. Quote Link to comment
psychomanu Posted October 14, 2004 Author Report Share Posted October 14, 2004 Thanks for the info. I contacted NI Belgium and this is indeed an example of functionality that cannot be used in an executable since the new default values cannot be saved to the vi because it is embedded in the exe. I have to do it using a configuration file (an ini-file). Don't you think the application builder should give a warning in such cases? Greetings, Manu. Quote Link to comment
PJM_labview Posted October 14, 2004 Report Share Posted October 14, 2004 Thanks for the info. I contacted NI Belgium and this is indeed an example of functionality that cannot be used in an executable since the new default values cannot be saved to the vi because it is embedded in the exe. I have to do it using a configuration file (an ini-file).Don't you think the application builder should give a warning in such cases? Greetings, Manu. 2321[/snapback] Check the help window (or right click on the node and click on help for....) For every method property the help will tell you if the method/property is available in the run time engine. Example for the Make Current Values Default Method "Make Current Values Default Method Inherits from VI Methods. Changes the defaults of all controls on the front panel to be the current values. The following table lists the flags for this method. Is settable when the VI is running No Requires the block diagram to be loaded No Is available on local LabVIEW only No Requires the front panel to be loaded Yes Must wait until user interface is idle Yes Is available with control VIs No Is available with global VIs Yes Is available with strict type definitions No Is available with polymorphic VIs No :!: Available in Run-Time Engine No <------------- here " PJM Quote Link to comment
psychomanu Posted October 14, 2004 Author Report Share Posted October 14, 2004 Aha, thanks a lot, in the mean time I already rewrote it using an ini-file. I still think the application builder should warn you when using such unavailable methods. Manu. Quote Link to comment
jpdrolet Posted October 14, 2004 Report Share Posted October 14, 2004 Aha,thanks a lot, in the mean time I already rewrote it using an ini-file. I still think the application builder should warn you when using such unavailable methods. Manu. 2329[/snapback] In fact it is not known until run-time that the referenced VI is or isn't in a run-time environment. In principle your application can legally invoke this VI method for a VI that is opened in a development LabVIEW environment. An application can't execute the VI method by itself, but can invoke it in another development environment. This question should be adressed in the FAQ... Edited to add picture Quote Link to comment
Sparc Posted April 27, 2005 Report Share Posted April 27, 2005 Thanks for the info. I contacted NI Belgium and this is indeed an example of functionality that cannot be used in an executable since the new default values cannot be saved to the vi because it is embedded in the exe. I have to do it using a configuration file (an ini-file).Don't you think the application builder should give a warning in such cases? Greetings, Manu. 2321[/snapback] Its not that "make current value default" isn't working, its the VI you're trying to operate on. When you use "make current value default" you have to save the VI to make it stick. The VI you want to change is inside the .exe. The .exe is being executed by the operating system. Generally speaking OS's lock the .exes before running them so they can't be deleted, renamed, overwritten, etc while they are running (saving the VI would overwrite the .exe). The exe is locked, and by extention so is your VI, hence the error. "Make current value default" should work fine from an .exe, just not on a VI inside the .exe. Sparc Quote Link to comment
jpdrolet Posted April 27, 2005 Report Share Posted April 27, 2005 Its not that "make current value default" isn't working, its the VI you're trying to operate on.When you use "make current value default" you have to save the VI to make it stick. The VI you want to change is inside the .exe. The .exe is being executed by the operating system. Generally speaking OS's lock the .exes before running them so they can't be deleted, renamed, overwritten, etc while they are running (saving the VI would overwrite the .exe). The exe is locked, and by extention so is your VI, hence the error. "Make current value default" should work fine from an .exe, just not on a VI inside the .exe. Sparc 4690[/snapback] That's not the problem. A LabVIEW built executable, with the Run-Time Engine, do not include the functions required to edit, recompile and save any VI, even if the VI is not located in the EXE. Those functions are available only in the LabVIEW development environment. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.