Interactive SourceMeter® Instrument Reference Manual Section 8: TSP co
2461-901-01 A/November 2015 8-65
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 displaywait.event() to wait for the user button
selection.
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)
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 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.delete() (on page 8-56)
display.waitevent() (on page 8-67)
display.readingformat
This attribute determines the format that is used to display measurement readings on the front-panel display of
the instrument.
Type TSP-Link accessible Affected by Where saved Default value
Usage
format = display.readingformat
display.readingformat = format
Use exponent format: display.FORMAT_EXPONENT
Add a prefix to the units symbol, such as k, m, or µ: