Keithley SourceMeter 2600 Series Reference Manual page 298

Table of Contents

Advertisement

12-24 Instrument Control Library
digio.writeport
Function
Writes to all digital I/O lines.
Usage
digio.writeport(data)
data
• The binary representation of data indicates the output pattern to be written to the I/O
Remarks
port. For example, a
Lines 2, 4, 6 and 8 are set high (1), and the other 10 lines are set low (0).
• Write protected lines will not be changed (see digio.writeprotect).
• The
Details
See
"Controlling digital I/O
Also see
digio.readbit, digio.readport,
Sets digital I/O lines 1 through 8 high (binary 00000011111111):
Example
digio.writeport(255)
digio.writeprotect
Attribute
Write protect mask that disables bits from being changed with the
and
digio.writeport
Usage
mask = digio.writeprotect
digio.writeprotect = mask
mask
• Bits that are set to one cause the corresponding line to be write protected.
Remarks
• The binary equivalent of
example, a
write protects lines 1, 2 and 3.
Details
See
"Controlling digital I/O
Also see
digio.writebit,
Example
Write protects lines 1, 2, 3 and 4:
digio.writeprotect = 15
2600S-901-01 Rev. A / May 2006
Value to write to the port; 0 to 16383.
value of 170 has a binary equivalent of 00000010101010.
data
function does not affect the present states of the digital I/O lines.
reset
lines" in
digio.writebit
functions.
Set to the value that specifies the bit pattern for write protect.
mask
value of 7 has a binary equivalent 00000000000111. This mask
mask
lines" in
digio.writeport
Return to
Series 2600 System SourceMeters Reference Manual
Section
10.
-- Reads write protect mask.
-- Writes write protect mask.
indicates the mask to be set for the I/O port. For
Section
10.
Section 12 topics
digio.writebit

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents