Digio.readbit(); Digio.readport() - Keithley 2651A Reference Manual

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Model 2651A High Power System SourceMeter® Instrument Reference Manual

digio.readbit()

This function reads one digital I/O line.
Type
TSP-Link accessible
Function
Yes
Usage
data = digio.readbit(N)
data
N
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
print(digio.readbit(4))
Also see
Digital I/O port

digio.readport()

digio.writebit()
digio.writeport()
digio.readport()
This function reads the digital I/O port.
Type
TSP-Link accessible
Function
Yes
Usage
data = digio.readport()
data
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).
2651A-901-01 Rev. A / March 2011
Affected by
A custom variable that stores the state of the I/O line
Digital I/O line number to be read (1 to 14)
(on page 7-43)
(on page 7-51)
(on page 7-52)
Affected by
The present value of the input lines on the digital I/O port
Where saved
Default value
Assume line 4 is set high, and it is then read.
Output:
1.00000e+00
Where saved
Default value
Section 7: Command reference
7-43

Advertisement

Table of Contents
loading

Table of Contents