2470 High Voltage SourceMeter Instrument Reference Manual
Section 14: TSP command reference
2470-901-01 Rev. A /
May
2019
14-59
Example
removePrompt3 = display.prompt(display.BUTTONS_NONE, "This prompt will disappear in
3 seconds")
delay(3)
display.delete(removePrompt3)
This example displays a prompt that is automatically removed in three seconds.
Also see
(on page 14-67)
display.input.number()
This function allows you to create a prompt that requests a number from the user on the front-panel display.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
numberEntered
= display.input.number("
dialogTitle
")
numberEntered
= display.input.number("
dialogTitle
",
numberFormat
)
numberEntered
= display.input.number("
dialogTitle
",
numberFormat
,
defaultValue
)
numberEntered
= display.input.number("
dialogTitle
",
numberFormat
,
defaultValue
,
minimumValue
)
numberEntered
= display.input.number("
dialogTitle
",
numberFormat
,
defaultValue
,
minimumValue
,
maximumValue
)
numberEntered
The number that is entered from the front-panel display;
nil
if Cancel is pressed on
the keypad
dialogTitle
A string that contains the text to be displayed as the title of the dialog box on the
front-panel display; can be up to 32 characters
numberFormat
The format of the displayed number:
Allow integers (negative or positive) only:
display.NFORMAT_INTEGER
(default)
Allow decimal values:
display.NFORMAT_DECIMAL
Display numbers in exponent format:
display.NFORMAT_EXPONENT
Display numbers with prefixes before the units symbol, such as n, m, or
µ
:
display.NFORMAT_PREFIX
defaultValue
The value that is initially displayed in the displayed keypad
minimumValue
The lowest value that can be entered
maximumValue
The highest value that can be entered