Section 8: TSP command reference
Model 2450 Interactive SourceMeter® Instrument Reference Manual
8-50
2450-901-01 Rev. B/September 2013
display.prompt()
This function allows you to create interactive buttons on the front panel display.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
promptID
= display.prompt(
buttonID
,
promptText
)
promptID
The ID of the prompt
buttonID
The button 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 buttons
Details
This command displays buttons and text on the front panel. You can set up scripts that respond to the button
when it is selected.
Example
smu.source.sweeplinear("test", 1, 10, 10)
display.prompt(display.BUTTONS_YESNO, "Would you like to start the sweep now?")
promptID, result = display.waitevent()
if result == display.BUTTON_YES then
trigger.model.initiate()
end
Create a linear sweep.
Display the prompt "Would you like to start the sweep now?"
If the user presses Yes, the sweep starts.
If the user presses No, the sweep does not start.
The
promptID
can be used by
display.delete(promptID)
to remove the displayed prompt.
Also see
None