# Robot Variables

Usually scripts are just a part of a structurated robot program. For this reason, when developing a script, sometimes you need to access variables that are not define inside the script, but in some other part of the program.

In order to run and test correctly scripts that use variables defined outside of the script scope you can use the ![](/files/YK8NtIlVJpVBrFtUucIh)**Variables Tool Window.**

With the Variables Tool Window you can add, edit and remove global variables, which will be then available inside your script.

<figure><img src="/files/5nIS9dfMlyOQe0VT0BBL" alt=""><figcaption></figcaption></figure>

Proceed as follow to define a variable:

1. Click on **Add** <img src="/files/zNl63rjOJoIX57BKmfHp" alt="" data-size="line"> to add a new variable.
2. Choose variable name and set an intialization value.

   <figure><img src="/files/hd4wq8W18JkDSg6tsoQe" alt=""><figcaption></figcaption></figure>
3. Optionally you can define the variable as a **System Variable**. System variables are defined inside the robot at system level and are shared by all programs, while simple **Global Variables** are defined inside a specific program.
4. OK.

{% hint style="info" %}
System variables correspond to Universal Robots **Installation Variables**.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.robpod.cloud/robot/robot-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
