LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reinitialize All To Default programmaticaly

How ?
0 Kudos
Message 1 of 4
(3,133 Views)
Establish a reference to the vi using the vi server and then use an
invoke node. I have not been able to get this to work after I have
made an exe with the application builder.
0 Kudos
Message 2 of 4
(3,133 Views)
IP,
I assume you are talking about updating changes from front panel controls/indicators, and that you want these new changes to be the new default settings.
I find 2 methods to do such:
(1) the Invoke node method / set as Default. There are examples on this site to see how this works (just search and you'll easily find them); however, I have found that this method requires a relatively good coding effort - basically because you are changing pre-programmed settings in real-time - not something super natural to default values (hence, they're called default values).

(2) Use configuration files. This is what I usually opt for. Simply have basic text files that are read upon each new running of your program. The key is to write to (update) these files upon
program termination. For this, I 'sense' if changes have occurred (compare new/old via shift registers, etc.) and if there are changes, write them to the necessary data field in the config file. Another benefit with config text files, though small, is that some users want to print or manage these files outside of LAbVIEW (there is no access to this with invoke nodes).

Good luck with it,
Doug
0 Kudos
Message 3 of 4
(3,133 Views)
There is a difference between "Make current values default" and "Reinitialize All to default". Both methods are available on the VI Invoke Node methods list. The first is runnable only on an idle VI in the development LabVIEW (since the VI is edited and requires recompilation). The latter reverts all the controls on the panel to their actual defaults values and can be invoked on running VIs and by the Run-Time Engine.


LabVIEW, C'est LabVIEW

0 Kudos
Message 4 of 4
(3,133 Views)