Digio.readport() - Keithley 708B Reference Manual

Switching matrix
Hide thumbs Also See for 708B:
Table of Contents

Advertisement

Section 7: Command reference
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 (0) of the binary number corresponds to Line 1. Bit 13 corresponds to Line 14.
For example, a returned value of 170 has a binary equivalent of 00000010101010, which indicates that Lines 2,
4, 6, and 8 are high (1), and the other 10 lines are low (0).
Example
data = digio.readport()
print(data)
7-56
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 2-7)
(on page 7-56)
(on page 7-64)
(on page 7-65)
Affected by
The present value of the input lines on the digital I/O port
Models 707B and 708B Switching Matrix Reference Manual
Assume line 4 is set high, and it is then read.
Output:
1.0000000e+00
Where saved
Default value
Assume Lines 2, 4, 6, and 8 are set high when
the I/O port is read.
Output:
1.7000000e+02
This is binary 10101010
707B-901-01 Rev. A / August 2010

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

707b

Table of Contents