![background image](http://html1.mh-extra.com/html/keithley/sourcemeter-2600-series/sourcemeter-2600-series_reference-manual_4098633294.webp)
12-20 Instrument Control Library
Series 2600 System SourceMeters Reference Manual
2600S-901-01 Rev. A / May 2006
Return to
digio
functions and attributes
The functions and attributes in this group are used to control read/write and trigger
operations for the digital I/O Port.
NOTE
The digital I/O lines can be used for both input and output. If a line is being
driven low, then a “0” value will be read by a command for that line. You
must write a “1” to all digital I/O lines that are to be used as inputs.
digio.readbit
Function
Reads one digital I/O line.
Usage
data = digio.readbit(line)
line
Digital I/O line number to be read (1 to 14).
Remarks
A returned value of “0” indicates that the line is low. A returned value of “1” indicates
that the line is high.
Details
See “
Also see
Example
Assume line 4 is set high, and it is then read:
data = digio.readbit(4)
print(data)
Output:
1.00
digio.readport
Function
Reads the digital I/O port.
Usage
data = digio.readport()
Remarks
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 bit 14
corresponds to line 14. For example, a returned value of 170 has a binary equivalent of
00000010101010. Lines 2, 4, 6 and 8 are high (1), and the other 10 lines are low (0).
Details
See “
Also see
Example
Assume lines 2, 4, 6 and 8 are set high, and the I/O port is then read:
data = digio.readport()
print(data)
Output:
1.02
(binary 10101010)
Содержание SourceMeter 2600 Series
Страница 507: ...AppendixA Specifications Appendix A topics Model 2600S Specifications page A 2 2600S 901 01 Rev A May 2006...
Страница 575: ...AppendixF DisplayCharacterCodes Appendix F topics Introduction page F 2...
Страница 592: ......
Страница 593: ......