
Series 3700 System Switch/Multimeter Reference Manual
Section 9
:
Instrument Control Library (ICL)
Document Number: 3700S-901-01 Rev. A / August 2007
9-49
digio.readbit
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).
Also see
digio.readport
(on page 9-49),
digio.writebit
(on page 9-53),
digio.writeport
(on page 9-
53)
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)
digio.trigger[N].assert
Function
Asserts a trigger on one of the digital I/O lines.
Usage
digio.trigger[N].assert()
N
: Digital I/O trigger line: 1 to 14
Remarks
The set pulsewidth determines how long the trigger is asserted.
Also see
digio.trigger[N].pulsewidth
(on page 9-51)
Example
Asserts trigger on I/O line 2:
digio.trigger[2].assert()
digio.trigger[N].clear
Function
Clears a trigger event on a digital I/O line.
Usage
digio.trigger[N].clear()
N
: Digital I/O trigger line: 1 to 14
Remarks
A trigger's event detector remembers if a trigger event has been detected since the last
digio.trigger[N].wait call. This function clears a trigger's event detector and discards the
previous history of the trigger line.
Also see
digio.trigger[N].wait
(on page 9-52)