07-19-2021 05:04 PM
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
Solved! Go to Solution.
07-19-2021 05:21 PM - edited 07-19-2021 05:22 PM
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.
07-19-2021 05:24 PM
@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.
07-19-2021 06:18 PM
@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.
07-19-2021 06:52 PM
Thank you.