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