Based on contributions by BoazvdV.
Use popups to show messages to the operator on the PolyScope run screen: a warning that stops the program until it’s acknowledged, or a status message that updates itself in the background. This guide covers both types and how to format them.
What you need
- A Universal Robot (CB2, CB3, or e-Series) with PolyScope.
- No extra hardware. Examples below were tested on e-Series 5.16, but both popup types work on all e-Series versions.
Which popup do I use
| Standard popup | Informational popup | |
|---|---|---|
| Created with | popup() script function |
Socket commands to the Dashboard Server |
| Styles | Info, Warning, Error | Free-form (HTML only) |
| Blocks the program | Optional (blocking=True/False) |
No |
| User can dismiss it | Yes, with an on-screen button | Yes, with an on-screen button |
| Minimum version | CB2 1.8.16941, CB3 3.1.17779, e-Series: all |
CB2 1.8.1694, CB3 3.1.17779, e-Series: all |
- A standard popup is the easiest option and is suited for user intervention: it can pause the program (
blocking=True) until the operator presses Continue. Downsides: the operator could accidentally press “Stop program” instead, and no other on-screen buttons work while it’s open. - An informational popup never pauses or interrupts the program, so it’s better for status messages you want to keep updating (e.g. “kit level: 40%”). It can only be styled with HTML, and it also blocks other on-screen buttons while open.
Official references: Create a popup, Create informational popups in the run screen.
Steps
1. Create a standard popup
Add a popup() call anywhere in your URScript program:
popup("here I am", title="Popup #1", blocking=True)
Signature (from the UR Script Manual, 5.16):
popup(s, title='Popup', warning=False, error=False, blocking=False)
s: the message text.title: the popup title.warning/error: set one toTrueto change the popup’s style.blocking: ifTrue, the program pauses until the operator presses Continue.
The exact parameter list can differ slightly between software versions — check the Script Manual for your installed version if a parameter is rejected.
2. Create an informational popup
Informational popups aren’t a built-in function. You create and close them by sending raw commands to the controller’s own Dashboard Server (a local service on port 29999):
# open a connection to the Dashboard Server for popups
socket_open("127.0.0.1", 29999, "internal")
# "127.0.0.1" = the Dashboard Server always runs on the controller itself
# 29999 = Dashboard Server port
# "internal" = local name for this socket connection
# show a popup
socket_send_string("popup The text I want", "internal")
socket_send_byte(10, "internal")
# the byte 10 is a newline, which the Dashboard Server needs to end the command
# close the popup
socket_send_string("close popup", "internal")
socket_send_byte(10, "internal")
If you show informational popups often, wrap this in a function that closes any existing popup first and formats the text as a heading:
def newmsg(text):
# close the current popup, if any
socket_send_string("close popup", "internal")
socket_send_byte(10, "internal")
# wrap the text in an <h1> tag and show it
text = str_cat("popup <h1>", text)
text = str_cat(text, "</h1>")
socket_send_string(text, "internal")
socket_send_byte(10, "internal")
end
Call socket_open() once at the start of your program before using newmsg().
3. Format the popup text with HTML
Both popup types support basic HTML: headings, bold/italic, line breaks, simple inline styles, and some emoji. Full HTML reference: w3schools.com/html.
To build a message from variables, use str_cat(). It only concatenates two values at a time, so chain calls to join more:
newmsg(str_cat(str_cat(
"Replace tube <br><br> kit level = ", kit_percentage), "%")
)
Emoji reference (checked working in PolyScope)
These UTF-8 emoji codepoints were confirmed to render inside popup HTML:
U+1F600 ·
U+1F603 ·
U+1F604 ·
U+1F601 ·
U+1F605 ·
U+1F606 ·
U+1F602 ·
U+1F609 ·
U+1F60A ·
U+1F607 ·
U+1F60E ·
U+1F60D ·
U+1F618 ·
U+1F617 ·
U+263A ·
U+1F61A ·
U+1F619 ·
U+1F60B ·
U+1F61B ·
U+1F61C ·
U+1F61D ·
U+1F610 ·
U+1F611 ·
U+1F636 ·
U+1F60F ·
U+1F612 ·
U+1F62A ·
U+1F634 ·
U+1F60C ·
U+1F614 ·
U+1F637 ·
U+1F635 ·
U+1F615 ·
U+1F61F ·
U+2639 ·
U+1F62E ·
U+1F62F ·
U+1F632 ·
U+1F633 ·
U+1F626 ·
U+1F627 ·
U+1F628 ·
U+1F630 ·
U+1F625 ·
U+1F622 ·
U+1F62D ·
U+1F631 ·
U+1F616 ·
U+1F623 ·
U+1F61E ·
U+1F613 ·
U+1F629 ·
U+1F62B ·
U+1F621 ·
U+1F620 ·
U+1F608 ·
U+2620 ·
U+1F63A ·
U+1F638 ·
U+1F639 ·
U+1F63B ·
U+1F63C ·
U+1F63D ·
U+1F640 ·
U+1F63F ·
U+1F63E ·
U+2763 ·
U+2764 ·
U+270C ·
U+261D ·
U+270D ·
U+1F435 ·
U+1F431 ·
U+1F42E ·
U+1F42D ·
U+2618 ·
U+2615
Common mistakes
- Forgetting
blocking=Trueon a standard popup when you actually need the program to wait for the operator. - Reusing an informational popup’s socket connection without closing the old popup first — always send
close popupbefore opening a new one, or use thenewmsg()helper. - Not accounting for the fact that both popup types block the other on-screen buttons while open, so avoid stacking popups.
Related
- How to build a custom URCaps interface for a UR teach pendant — for interfaces that need more than a popup can offer.
Rewritten and consolidated (Sept 2026) from the original student how-to’s: How to use two kinds of popups (Universal Robots).