![background image](http://html1.mh-extra.com/html/keithley/3700-series/3700-series_reference-manual_3931523035.webp)
Series 3700 System Switch/Multimeter Reference Manual
Section 2
:
TSP Programming Fundamentals
Document Number: 3700S-901-01 Rev. A / August 2007
2-15
User’s program script example
loadscript
dmm.reset(„all‟)
function MyDcv(speed)
dmm.func = „dcvolts‟
dmm.nplc = speed
dmm.range = 10
reading = dmm.measure()
print(reading)
end
endscript
When calling the function, you must specify the measurement speed in the argument for the
function. For example, to set the measurement speed to 0.5, call the function as follows:
MyDcv(0.5)
It will set the DMM function to DCV, NPLC to 0.5 and range to 10V. The voltage reading is sent
to the host computer and displayed.
Interactive script
An interactive script prompts the operator (via the Series 3700 display) to input test parameters
(via the Series 3700 front panel). The chunk fragment in the following table uses display
messages to prompt the operator to select a measure function (dcv or 2-wire), a range based
on function and to input the measurement speed. When an input prompt is displayed, the script
will wait until the operator input the parameter and/ or press the
ENTER
key.
The display.prompt command, in the following script, prompts the user to input a measurements
speed. If a value is not entered, the default level (1) will be set when ENTER is pressed. The
operator will not be able to input values that are not within the limits (minimum of 0.01 and
maximum of 3).
Example interactive chunk fragment for a script: Script chunk fragment (Test Script Builder or
user‘s program)
--.Prompt operator to select function:
...myfunc = display.menu („Select function‟, „dcvolts twowireohms‟)
--....now prompt for range based on function selected
...if (my func == „dcvolts‟) then
......myrange = display.menu(„Select range‟, ‟10 100‟)
...if (myrange == „10”) then
......range_value = 10
...else