14: TSP command reference 2470 High Voltage SourceMeter Instrument
14-70 2470-901-01 Rev. A / May 2019
display.waitevent()
This function causes the instrument to wait for a user to respond to a prompt that was created with a prompt
command.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
objectID, subID = display.waitevent()
objectID, subID = display.waitevent(timeout)
A number that identifies the object, such as a prompt message, that is displayed on
the front panel
The returned value after a button is pressed on the front panel:
ï‚§ display.BUTTON_YES
ï‚§ display.BUTTON_NO
ï‚§ display.BUTTON_OK
ï‚§
The amount of time to wait before timing out; time is 0 to 300 s, where the default of
0 waits indefinitely
Details
This command waits until a user responds to a front-panel prompt that was created with the
display.prompt() command.
Example
smu.source.sweeplinear("test", 1, 10, 10)
display.prompt(display.BUTTONS_YESNO, "Would you like to start the sweep now?")
sweepTest, result = display.waitevent()
if result == display.BUTTON_YES then
trigger.model.initiate()
end
display.prompt(display.BUTTONS_YESNO, "Would you like to switch to the Graph screen?")
promptID, result = display.waitevent()
if result == display.BUTTON_YES then
display.changescreen(display.SCREEN_GRAPH)
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 and the message is removed.
Display the prompt "Would you like to switch to the Graph screen?"
If the user presses Yes, the Graph screen is displayed.
If the user presses No, the user remains on the present screen.
Also see
display.input.prompt() (on page 14-63)
display.prompt() (on page 14-67)