‎06-15-2010 11:06 AM
I want to convert the value measured by loadcells to force , and I use a 50 gr calibration for it,and i want to ask user if he/she wants to calibrate the system or not and if yes just over write the variable a and b , and if not just used the previous a and b,
Is there anyway that i could save these variables?
y=ax+b
‎06-15-2010 11:14 AM
‎06-15-2010 11:22 AM
‎06-15-2010 12:05 PM
You could create simple indicators for a and b and write to them anytime. You would need to create local variables for each to read from them. However, beware of race conditions. If you are not sure about, or don't know what race conditions are, use shift registers or an Action Engine.
Here are several methods to store numbers.
‎06-15-2010 12:06 PM
If you want to stop the application (program) and retrieve the values for the equation later, then you can write the values to a file, such as what Jeff proposed. I also use xml files, which are easy and great to work with. If you want to change / re-use values while the application is running, then shift registers are a good way to go, such as proposed by RavensFan.
It depends on the type of solution that you are looking for.