02-14-2012 05:18 PM
I am running an application with some analog inputs that I am converting to a desired unit by calculating a span factor. I am putting this span factor in a network share variable, but when I turn my equipment off and on again, the variable have a value of zero an my calculation of the unit using this span factor doesn't work because (obviously) all the result in the multiplication will be zero. Is there a way to store this value in the variable as a default value so when the program load the value load with it? If so, can I do that pragmatically so when a calibration need to be perform the new span factor can be stored as default in that same variable? If that is not possible, Can someone recommend me a work around or any way to do something like that?
02-15-2012 06:20 AM
HI,
You can store Default values in a file. When you run your application first read the file and assign Default values to all variables.
In this way, if you want to change default values later, you can just update file and your code will take care of rest. ![]()
02-15-2012 07:37 AM
Thanks for your response Gak,
Can you give me a little bit more of details or refer me to an example? I am relatively new to LabVIEW world and don't know how to do that.
02-16-2012 05:09 AM
Hi,
Find attached example of how to read text file. You will get many examples of how to read excel sheet, if you want to use excel.
Once you read text file, you have all default values of variable. You can just assign these values to network shared variable.
PS: Text file is "TAB" delimited.