Jump to content

make current values default in exe doesn't work


Recommended Posts

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.

Link to comment

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.

Link to comment
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

Link to comment
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.

post-447-1097773441.gif?width=400

This question should be adressed in the FAQ...

Edited to add picture

Link to comment
  • 6 months later...
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

Link to comment
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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.