# HMI and Doosan Robotics

There are several ways to structure an [HMI program](/hmi-designer/introduction.md) with Doosan Task 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 functions
* Interaction based on variables

### **Interaction based on functions**

In this scenario motion actions are defined inside functions (Sub) linked to HMI buttons.

<figure><img src="/files/48h933qBTRMTIIOpjjk3" alt=""><figcaption></figcaption></figure>

### **Interaction based on variables**

In this scenario motion actions are defined inside the Main program. HMI buttons are linked with variables, used to control the main program flow.

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


---

# 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/hmi-designer/hmi-and-doosan-robotics.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.
