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 Name | Data Type | Default Value | Description |
---|---|---|---|
message | string | - | Message provided to the user
|
pm_type | int | DR_PM_MESSAGE | Message type
|
button_type | int | 0 | button type of TP pop message
|
Return
Value | Description |
---|---|
0 | Success |
Negative value | Failed |
Exception
Exception | Description |
---|---|
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
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)