LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store a default value in a network share variable?

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?

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 1 of 4
(3,289 Views)

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. Smiley Wink

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 2 of 4
(3,277 Views)

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.

Ferdinand Martinez
FMO Automation LLC
0 Kudos
Message 3 of 4
(3,274 Views)

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.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Download All
0 Kudos
Message 4 of 4
(3,264 Views)