Digital:read; Digital:write <N - Keithley 2450 Reference Manual

Interactive sourcemeter instrument
Table of Contents

Advertisement

Model 2450 Interactive SourceMeter® Instrument Reference Manual

:DIGital:READ?

This command reads the digital I/O port.
Type
Query
Usage
:DIGital:READ?
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 digital I/O line 1; bit B6 corresponds to digital I/O line
6.
For example, a returned value of 42 has a binary equivalent of 101010, which indicates that lines 2, 4, 6 are high
(1), and the other lines are low (0).
Example
:DIG:READ?
Also see
Digital I/O bit weighting
Digital I/O port
:DIGital:WRITe <n>
This command writes to all digital I/O lines.
Type
Command
Usage
:DIGital:WRITe <n>
<n>
Details
The binary representation of the value indicates the output pattern to be written to the I/O port. For example, a
value of 63 has a binary equivalent of 111111 (all lines are set high); a data value of 42 has a binary equivalent
of 101010 (lines 2, 4, and 6 are set high, and the other 3 lines are set low).
An instrument reset does not affect the present states of the digital I/O lines.
Example
:DIG:WRIT 63
Also see
Digital I/O bit weighting
Digital I/O port
2450-901-01 Rev. B/September 2013
Affected by
Not applicable
Assume lines 2, 4, and 6 are set high when the I/O port is read.
Output:
42
This is binary 101010
(on page 3-67)
(on page 3-62)
Affected by
Not applicable
The value to write to the port (0 to 63)
(on page 3-67)
(on page 3-62)
Section 6: SCPI command reference
Where saved
Not applicable
Where saved
Not applicable
Sets digital I/O lines 1 through 6 high (binary
111111).
Default value
Not applicable
Default value
Not applicable
6-21

Advertisement

Table of Contents
loading

Table of Contents