7: TSP command reference Series 2600B System SourceMeter® Instrument
7-50 2600BS-901-01 Rev. B / May 2013
Details
A returned value of zero (0) indicates that the line is low. A returned value of one (1) indicates that the line is
high.
Example
Assume line 4 is set high, and it is then read.
Output:
Also see
digio.readport() (on page 7-50)
digio.writebit() (on page 7-58)
digio.writeport() (on page 7-59)
Digital I/O port (on page 3-83)
digio.readport()
This function reads the digital I/O port. This function is not available on the Models 2604B/2614B/2634B.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
data = digio.readport()
The present value of the input lines on the digital I/O port
Details
The binary equivalent of the returned value indicates the value of the input lines on the I/O port. The least
significant bit (bit B1) of the binary number corresponds to line 1; bit B14 corresponds to line 14.
For example, a returned value of 170 has a binary equivalent of 000000010101010, which indicates that lines 2,
4, 6, and 8 are high (1), and the other 10 lines are low (0).
Example
print(data)
Assume lines 2, 4, 6, and 8 are set high when
the I/O port is read.
Output:
1.70000e+02
Also see
digio.readbit() (on page 7-49)
digio.writebit() (on page 7-58)
digio.writeport() (on page 7-59)
Digital I/O port (on page 3-83)