# Adding a variable to a program

1. Start editing the real-time application.
2. In the menu bar, click Program.
3. On the worksheet, click Add.
4. Select the tab local variable, global variable or Data storage.
5. In the drop-down list, mark the variable.
6. Click OK.

If a Program Organisation Unit written in Function Block Diagram contains multiple networks, the order of execution depends on the last element's position on the worksheet:

- From top to bottom.
- On the same level from left to right.

1. Drag-and-drop the variable to the desired position in the worksheet.