> 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/working-examples/doosan-robotics/touch-example-dr.md).

# Touch Example DR

### HMI Panel File

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

{% file src="/files/fHM91J6un6dcCQzav5zV" %}

### Script File

```python
from DRCF import *

# HMI variables
task_running = False
display_status = ""

# HMI functions
def start_task():
    global task_running, display_status
    task_running = True

    while task_running:
        movel(posx(40.1, -294.5, 400, 0, 178.1, 0), v=200, a=200)
        display_status = ""
        amovel(posx(40.1, -294.5, 100, 0, 178.1, 0), v=200, a=200)
        while check_motion() != DR_STATE_IDLE:
            if abs(get_tool_force()[DR_AXIS_Z]) > 8:
                stop(DR_QSTOP)
                display_status = "TOUCH DETECTED!"
                break
            wait(0.1)

    display_status = ""
    movel(posx(40.1, -294.5, 400, 0, 178.1, 0), v=200, a=200)

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.robpod.cloud/hmi-designer/working-examples/doosan-robotics/touch-example-dr.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
