Section 11: TSP command reference Series 3700A System Switch/Multimeter Reference Manual
11-434 3700AS-901-01 Rev. D/June 2018
tspnet.clear()
This function clears any pending output data from the instrument.
Usage
tspnet.clear(connectionID)
The connection ID returned from tspnet.connect()
Details
This function clears any pending output data from the device. No data is returned to the caller and no
data is processed.
Example
tspnet.write(testdevice, "print([[hello]])")
print(tspnet.readavailable(testdevice))
tspnet.clear(testdevice)
print(tspnet.readavailable(testdevice))
Write data to a device, then print how much
is available.
Output:
6.00000e+00
Clear data and print how much data is
available again.
Output:
0.00000e+00
Also see
tspnet.connect() (on page 11-434)
tspnet.readavailable() (on page 11-439)
tspnet.write() (on page 11-445)
tspnet.connect()
This function establishes a network connection with another LAN instrument or device through the LAN interface.
Usage
connectionID = tspnet.connect("ipAddress")
connectionID = tspnet.connect("ipAddress", portNumber, "initString")
The connection ID to be used as a handle in all other tspnet function calls
IP address to which to connect in a string
Port number (default 5025)
Initialization string to send to ipAddress