8: TSP command reference  Model 2461 Interactive SourceMeterĀ® Instrument 
 
8-324  2461-901-01 A/November 2015 
 
Details 
The binary representation of data indicates the output pattern that is written to the I/O port. For 
example, a data value of 2 has a binary equivalent of 010. Line 2 is set high (1), and the other two 
lines are set low (0). 
The reset() function does not affect the present states of the trigger lines. 
Example 
 
Sets the synchronization lines 1 and 2 high (binary 011). 
Also see 
tsplink.line[N].state (on page 8-320) 
 
tspnet.clear() 
This function clears any pending output data from the instrument. 
Type  TSP-Link accessible 
Affected by  Where saved  Default value 
   
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 8-325) 
tspnet.readavailable() (on page 8-329) 
tspnet.write() (on page 8-335)