Section 9: TSP command reference  Series 2600B System SourceMeter® instrument Reference Manual 
9-398  2600BS-901-01 Rev. F/August 2021 
 
Usage 
mask = tsplink.writeprotect 
tsplink.writeprotect = mask 
 
An integer that specifies the value of the bit pattern for write-protect; set bits to 1 to 
write-protect the corresponding TSP-Link trigger line 
Details 
The binary equivalent of mask indicates the mask to be set for the TSP-Link trigger line. For example, 
a mask value of 5 has a binary equivalent of 101. This mask write-protects TSP-Link trigger lines 1 
and 3. 
Example 
 
Write-protects TSP-Link trigger lines 1 and 3. 
Also see 
Controlling digital I/O lines (on page 4-41) 
tsplink.readbit() (on page 9-385) 
tsplink.readport() (on page 9-385) 
tsplink.writebit() (on page 9-396) 
tsplink.writeport() (on page 9-397) 
 
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