# How to show pop-up messages on the Doosan teach pendant with tp\_popup

**URL:** <https://www.robotexchange.io/t/how-to-show-pop-up-messages-on-the-doosan-teach-pendant-with-tp-popup/4681>\
**Category:** 💡 How-to\
**Tags:** Python, drl-studio, Doosan-robot\
**Created:** [September 2, 2026, 12:16am UTC](https://www.robotexchange.io/t/how-to-show-pop-up-messages-on-the-doosan-teach-pendant-with-tp-popup/4681 "2026-09-02T00:16:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thijs](https://www.robotexchange.io/user_avatar/www.robotexchange.io/thijs/32/4_2.png) [@thijs](https://www.robotexchange.io/u/thijs)\
**Post date:** [September 2, 2026, 12:16am UTC](https://www.robotexchange.io/t/how-to-show-pop-up-messages-on-the-doosan-teach-pendant-with-tp-popup/4681/1 "2026-09-02T00:16:19Z")

</div>

_Based on contributions by Erik\_Endlich._

Use `tp_popup()` to show a message on the teach pendant from inside a running DRL program — for example to tell an operator why the robot has stopped, or to ask them to press continue before it proceeds.

## What you need

- A Doosan robot
- A laptop with [DRL Studio](https://www.homberger-robotica.com/prodotti/homberger-hub/drl-studio/) (Homberger Hub) installed

## Steps

### 1. Call tp\_popup

```python
tp_popup(string message, int pm_type, int button_type)

```

| Input | Type | Description |
| --- | --- | --- |
| message | string | The message shown in the pop-up |
| pm\_type | int | Message type: `DR_PM_MESSAGE`, `DR_PM_WARNING`, or `DR_PM_ALARM` |
| button\_type | int | `0` shows a “continue” and a “stop” button; `1` shows only a “continue” button |

Example — an information pop-up with only a continue button:

```python
tp_popup('Lookout robot arm starts homing.', pm_type=DR_PM_MESSAGE, button_type=1)

```

The program pauses on this line and waits for the operator to press the button on the pendant before continuing.

### 2. Use it to report a condition, not as a condition itself

`tp_popup()` cannot be used directly as the condition of an `if` statement. Use it _after_ an `if` statement to report the result of a check. For example, to warn the operator when a camera failed to detect a workpiece:

```python
### function that uses all the other functions to do a complete solder job ###
def soldeer():
    x_y_r = get_data_from_cognex('GVC019')
    if x_y_r == ['']:
        tp_popup('No mold detected, please place mold in the detectable square', pm_type=DR_PM_MESSAGE, button_type=1)
        return 0

```

See [How to connect a Cognex camera to a Doosan robot over TCP](https://www.robotexchange.io/t/how-to-connect-a-cognex-camera-to-a-doosan-robot-over-tcp/4687) for the `get_data_from_cognex()` function used here.

## Related

- [How to connect a Cognex camera to a Doosan robot over TCP](https://www.robotexchange.io/t/how-to-connect-a-cognex-camera-to-a-doosan-robot-over-tcp/4687)
- [How to set up safety area (space) limits on a Doosan robot](https://www.robotexchange.io/t/how-to-set-up-safety-area-space-limits-on-a-doosan-robot/4682)

* * *

_Rewritten and consolidated (Sept 2026) from the original student how-to’s: [How to use Pop-ups on a Doosan robot](https://www.robotexchange.io/t/how-to-use-pop-ups-on-a-doosan-robot/3269)._
