Get a variable

GetVariable gets the details of a user variable. This function is not required to use if you handle all your user variables in one application, because after you add variables, you can obtain the pointers of the variables, which allows you to access the variables. However, if you have other applications that need to access the variables, you must use GetVariable or GetVariables to access the variable in these applications. The use of GetVariable is simple. Just pass the address of the variable to the function.

The following code is written in the function CreateUserVariables.

Copy
/*------Get a variable------*/

GetVariable(&uTemperature);
GetVariable(&uVoltage);
GetVariable(&uTemperature);