From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save new data as default vales for a control in exe application?

Solved!
Go to solution

Hi Application Engineers,

 

My program has a calibration function. A calibration is required prior to new measurements each time when my instrument is moved to a new place. The calibration data needs to be entered to the program as an array control and be kept as default  values for subsequent measurements. it can be done easily in source code by making current values as default and then saving the program. 

 

My question is how to do it in exe application or an installer for final user so that final user does not need to input the calibration data each time after reload the program?  

 

Thanks,

Gu

0 Kudos
Message 1 of 5
(1,275 Views)
Solution
Accepted by edmonton

You can't, you would have to recompile the program with the new defaults.

 

You are going to have to store the values in a separate file that can be updated.

 

Read the file and load the calibration values every time you launch your program.

========================
=== Engineer Ambiguously ===
========================
Message 2 of 5
(1,270 Views)
Solution
Accepted by edmonton

@RTSLVU wrote:

You can't.

 

You are going to have to store the values in a separate file that can be updated.

 

 


Even if you could, that is a bad strategy.  Loading them in from somewhere else is a much better solution.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 3 of 5
(1,266 Views)
Solution
Accepted by edmonton

@edmonton wrote:

Hi Application Engineers,

 

My program has a calibration function. A calibration is required prior to new measurements each time when my instrument is moved to a new place. The calibration data needs to be entered to the program as an array control and be kept as default  values for subsequent measurements. it can be done easily in source code by making current values as default and then saving the program. 

 

My question is how to do it in exe application or an installer for final user so that final user does not need to input the calibration data each time after reload the program?  

 

Thanks,

Gu


I have a similar problem coming up. Unfortunately I'm new so I haven't done it yet, but here are the resources I saved for that.

 

Loading and Storing User Settings

 

Forum link

https://forums.ni.com/t5/LabVIEW/How-to-save-user-setting/td-p/3228287

 

Video on .ini Files in LabVIEW

https://www.youtube.com/watch?v=XvQq27D88nQ

 

Video on .xml files in LabVIEW

https://www.youtube.com/watch?v=gLVkkHJGgac&t=90s

 

Hope that helps a bit.


___________________________________________________________________________________________________________________________________________________
Upgraded from intern to undergrad automation engineer. Attempting to explain to my employer why I need official training…. since I’m the groups only automation engineer.

I tried. I really did.
Message 4 of 5
(1,236 Views)

Thank you.

0 Kudos
Message 5 of 5
(1,225 Views)