User manual
Section 13: Instrument Control Library (ICL) Series 3700 System Switch/Multimeter Reference Manual
13-92 3700S-901-01 Rev. C / July 2008
digio.trigger[N].wait()
Function
Waits for a trigger.
Usage
triggered = digio.trigger[N].wait(timeout)
N: Digital I/O trigger line: 1 to 14
timeout: Set timeout in seconds.
triggered: Returns `true' if a trigger was detected, or `false' if no triggers were
detected during the timeout period.
Remarks
This function will wait up to timeout seconds for an input trigger. If one or more trigger
events were detected since the last time digio.trigger[N].wait (this function) or
digio.trigger[N].clear() (on page 13-88) was called, this function will return immediately.
After waiting for a trigger with this function, the event detector will be automatically
reset and re-armed. This is true regardless of the number of events detected.
Also see
digio.trigger[N].clear() (on page 13-88)
Example
Waits up to three seconds for a trigger to be detected on trigger line 4, then displays if
the trigger was detected:
triggered = digio.trigger[4].wait(3)
print(triggered)
Output: false (no triggers detected) true (trigger detected)
digio.writebit()
Function
Sets a digital I/O line high or low.
Usage
digio.writebit(bit, data)
bit: Digital I/O line number (1 to 14)
data: Value to write to the bit; 0 (low) or 1 (high)
Remarks
If the output line is write protected, using the digio.writeprotect() (on page 13-93)
attribute, the command will be ignored.
The reset function does not affect the present states of the digital I/O lines.
NOTE The second parameter (data) needs to be 0 to clear the bit. Any value other
than 0 causes the bit to be set.
Also see
digio.readbit() (on page 13-87)
digio.readport() (on page 13-87)
digio.writeport() (on page 13-92)
Example
Sets digital I/O line 4 low (0):
digio.writebit(4, 0)
digio.writeport()
Function
Writes to all digital I/O lines.
Usage
digio.writeport(data)
data: Value to write to the port; 0 to 16383.