2470 High Voltage SourceMeter Instrument Reference Manual
Section 14: TSP command reference
2470-901-01 Rev. A /
May
2019
14-67
display.prompt()
This function allows you to create an interactive dialog prompt that displays a custom message on the front-panel
display.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
promptID
= display.prompt(
buttonID
, "
promptText
")
promptID
A set of characters that identifies the prompt; up to 63 characters
buttonID
The type of prompt to display; choose one of the following options:
display.BUTTONS_NONE
display.BUTTONS_OK
display.BUTTONS_CANCEL
display.BUTTONS_OKCANCEL
display.BUTTONS_YESNO
display.BUTTONS_YESNOCANCEL
promptText
A string that contains the text that is displayed above the prompts
Details
This command displays buttons and text on the front panel. You can set up scripts that respond to the
buttons when they are selected.
If you send
display.BUTTONS_NONE
, the operator needs to press the EXIT key to clear the
message from the front-panel display. You can also use the
display.delete()
command to
remove the prompt.
Only one prompt can be active at a time.
When the user presses a button, the button presses are returned as one of the following options:
•
OK:
display.BUTTON_OK
•
Cancel:
display.BUTTON_CANCEL
•
Yes:
display.BUTTON_YES
•
No:
display.BUTTON_NO
To capture return values, you need to use
display.waitevent()
to wait for the user button
selection.