> For the complete documentation index, see [llms.txt](https://docs.robpod.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.robpod.cloud/hmi-designer/hmi-and-ur-polyscope.md).

# HMI and UR Polyscope

There are several ways to structure an [HMI program](/hmi-designer/introduction.md) within the UR polyscope program editor, and typically each developer has his own preferred way. Below you can find the two most used ways to structure a program with HMI (a mix of the two is also possible):

* Interaction based on variables
* Interaction based on functions

### **Interaction based on variables**

In this scenario, to triger a robot action, HMI Buttons are linked to program (or installation) variables . Robot task is defined inside the Main Program, which can loop continuously.&#x20;

<figure><img src="/files/JOVEJN35uWfym09vPAzb" alt=""><figcaption></figcaption></figure>

### **Interaction based on functions**

In this scenario, to triger a robot action, HMI Buttons are linked to program functions (called Sub Program inside Polyscope). Robot tasks are defined inside Sub Programs, which are automatically called by HMI components. As robot tasks are executed inside Sub Programs, Main Program can be stopped as it is not required to loop continuously.

<figure><img src="/files/AFpv8pVPgqsxhaXcwZx3" alt=""><figcaption></figcaption></figure>
