Editing Variables
Follow this procedure to edit the declaration of a variable in a variables editor (all the following steps are optional and you will typically skip most of them when editing a variable):







- Edit the name of the variable by entering the new name in the corresponding cell.
- Change the variable type, either by editing the type name in the corresponding cell or by clicking on the button in its right and select the desired type from the object browser.
- Edit the address of the variable by clicking on the button in the corresponding cell and entering the required information in the window that shows up. Note that, in the case of global variables, this operation may change the position of the variable in the project tree.
- In the case of global variables, you can assign the variable to a group. You have three ways to do so:
- First create the group and then create the variable from inside the group.
- You can drag&drop existing variable into a new group
- Specify the group the variable belongs to when creating the variable; to do so, choose the appropriate voice from the menu Variables>Add; the following window will appear, allowing you to specify also the variable group.
- Choose whether a variable is an array or not; if it is, edit the size of the variable
- Edit the initial values of the variable: click on the button in the corresponding cell and enter the values in the window that pops up.
- Assign an attribute to the variable (for example, CONSTANT or RETAIN), by selecting it from the list which opens when you click on the corresponding cell.
- Type a description for the variable in the corresponding cell. Note that, in the case of global variables, this operation may change the position of the variable in the project tree.
- Save the project to persist the changes you made to the declaration of the variable.