Model 2651A High Power System SourceMeter® Instrument Reference Manual
tsplink.readport()
This function reads the TSP-Link trigger lines as a digital I/O port.
Type
TSP-Link accessible
Function
Yes
Usage
data = tsplink.readport()
data
Details
The binary equivalent of the returned value indicates the input pattern on the I/O port. The least
significant bit of the binary number corresponds to line 1 and the value of bit 3 corresponds to line 3.
For example, a returned value of 2 has a binary equivalent of 010. This indicates that line 2 is high
(1), and that the other two lines are low (0).
Example
data = tsplink.readport()
print(data)
Reads state of all three TSP-Link lines.
Assuming line 2 is set high, the output is:
2.000000e+00
(binary 010)
The format of the output may vary depending on the ASCII precision setting.
Also see
TSP-Link trigger lines
tsplink.readbit()
tsplink.writebit()
tsplink.writeport()
2651A-901-01 Rev. C October 2021
Affected by
Numeric value that indicates which lines are set
(on page 3-98)
(on page 7-424)
(on page 7-439)
(on page 7-440)
Section 7: TSP command reference
Where saved
Default value
7-425
Need help?
Do you have a question about the Keithley 2651A and is the answer not in the manual?