Skip to main content
Skip table of contents

tp_popup(message, pm_type=DR_PM_MESSAGE, button_type=0)

Features

This function provides a message to users through the Teach Pendant. The higher level controller receives the string and displays it in the popup window, and the window must be closed by a user’s confirmation.

Parameters

Parameter NameData TypeDefault ValueDescription

message

string

-

Message provided to the user

  • Messages are limited to within 256 bytes.
  • It is recommended that the text be concise. For long text, some content is omitted with an ellipsis (…).
  • Formatting-related code such as newline (\n) or carriage return (\r) is not allowed.

pm_type

int

DR_PM_MESSAGE

Message type

  • DR_PM_MESSAGE
  • DR_PM_WARNING
  • DR_PM_ALARM

button_type

int

0

button type of TP pop message

  • 0 : show Stop & Resume button
  • 1 : show Stop button

Return

ValueDescription

0

Success

Negative value

Failed

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

PY
tp_popup("move done", DR_PM_MESSAGE)
tp_popup("Error!! ", DR_PM_ALARM)
a=1
b=2
c=3
tp_popup("a={0}, b={1}, c={2}".format(a,b,c) ,DR_PM_MESSAGE)
tp_popup("critical error!! ", DR_PM_ALARM, 1)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.