Section 2
:
TSP Programming Fundamentals
Series 3700 System Switch/Multimeter Reference Manual
2-12
Document Number: 3700S-901-01 Rev. A / August 2007
Script Editor
The script chunk is written and/or modified in the Script Editor. Notice that there is a tab
available for each opened script file. A script project is then downloaded to the Series 3700
where it can be run.
Programming interaction
Up to seven tabs can be displayed in the lower pane of the Workspace window to provide
programming interaction between the Test Script Builder and the Series 3700. The instrument
console shown is used to send commands to the connected Series 3700. Retrieved data (for
example, readings) from commands and scripts appear in the instrument console.
Sending commands and statements
Using your own program or the Test Script Builder, non-scripted chunks can be executed one
line at a time. Responses (for example, readings) are then transmitted back to the computer.
Measure voltage
The DMM of the Series 3700 is capable of measuring various functions. The following code
fragments program the DMM to measure DC voltage.
Command
Description
reset()
Return the Series 3700 to default settings.
dmm.func = 'dcvolts'
Set the DMM function to DC volts
dmm.nplc = 0.1
Set the NPLC for DC volts
dmm.range = 10
Set the range for DC volts
reading = dmm.measure()
Take the DC volts measurement
print(reading)
Displays measure voltage reading
Read and write to digital I/O port
The Digital I/O port of the Series 3700 is used to control external circuitry (such as a component
handler for binning operations). The I/O port has 14 input/output bits (lines) that can be at TTL
logic state 1 (high) or 0 (low). See the pinout for the Digital I/O port for additional information.
There are ICL commands to read and/or write to each individual bit, and commands to read and
write to the entire port. Use the following code fragment to write to one bit of the Digital I/O port.
The I/O bit is then read and the state is returned to the PC where it is displayed.
Command
Description
digio.writebit(4,0)
Writes