LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use "Make Current Values Default" Programmatically?

When I use this method in a Invoke node, I get the error code 1000, then i can't use it in run mode?
How can I modify the default values in a Built aplicattion, and save for the next time I load it?
0 Kudos
Message 1 of 3
(3,197 Views)
There was a discussion about this at Info-LabVIEW you can see it at(labview.pica.army.mil) or search the NI website for "error 1000" or "make current value default" But here's some info:

Error 1000 means that the VI is in protected mode, that is, you can't edit it. A vi is protected when is running or a strict type def. refnum is opened to it.

But in Built in app, as long as I know, you can't edit your vi because it has no diagram, so you should use some kind of ini files to acomplish this, I mean you should make values load at start and write current values to that file when you want.

Hope this helps.
Message 2 of 3
(3,197 Views)
Hi,

I've attached a small demo to show setting up the front panel control. The VI Change Control Value.vi is the one you run. Demo.vi has one control on the front panel whose value is setup by Change Control Value.vi. Just unzip the file, keeping the two VI's in the same folder. You don't need to open the Demo.vi.

I've used this mechanism onlong with a config file when creating a Virtual Instrument Driver.

Regards
Ray.
Regards
Ray Farmer
0 Kudos
Message 3 of 3
(3,197 Views)