
2606B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2606B-901-01 Rev. B / May 2018
7-369
tspnet.clear()
This function clears any pending output data from the instrument.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
tspnet.clear(
connectionID
)
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.00
Clear data and print how much data is
available again.
Output:
0.00
Also see
(on page 7-369)
(on page 7-374)
(on page 7-380)
tspnet.connect()
This function establishes a network connection with another LAN instrument or device through the LAN interface.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
connectionID
= tspnet.connect("
ipAddress
")
connectionID
= tspnet.connect("
ipAddress
",
portNumber
, "
initString
")
connectionID
The connection ID to be used as a handle in all other
tspnet
function calls
ipAddress
IP address to which to connect in a string
portNumber
Port number (default 5025)
initString
Initialization string to send to
ipAddress