Section 14: TSP command reference
2470 High Voltage SourceMeter Instrument Reference Manual
14-52
2470-901-01 Rev. A /
May
2019
digio.line[N].mode
This attribute sets the mode of the digital I/O line to be a digital line, trigger line, or synchronous line and sets the
line to be input, output, or open-drain.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Attribute (RW)
Yes
Restore configuration
Instrument reset
Power cycle
Configuration script
digio.MODE_DIGITAL_IN
Usage
lineMode
= digio.line[
N
].mode
digio.line[
N
].mode =
lineMode
lineMode
The digital line control type and line mode:
Digital control, input:
digio.MODE_DIGITAL_IN
Digital control, output:
digio.MODE_DIGITAL_OUT
Digital control, open-drain:
digio.MODE_DIGITAL_OPEN_DRAIN
Trigger control, input:
digio.MODE_TRIGGER_IN
Trigger control, output:
digio.MODE_TRIGGER_OUT
Trigger control, open-drain:
digio.MODE_TRIGGER_OPEN_DRAIN
Synchronous master:
digio.MODE_SYNCHRONOUS_MASTER
Synchronous acceptor:
digio.MODE_SYNCHRONOUS_ACCEPTOR
N
The digital I/O line: 1 to 6
Details
You can use this command to place each digital I/O line into one of the following modes:
•
Digital open-drain, output, or input
•
Trigger open-drain, output, or input
•
Trigger synchronous master or synchronous acceptor
A digital line allows direct control of the digital I/O lines by writing a bit pattern to the lines. A trigger
line uses the digital I/O lines to detect triggers.
The following settings of
lineMode
set the line for direct control as a digital line:
•
digio.MODE_DIGITAL_IN
: The instrument automatically detects externally generated logic
levels. You can read an input line, but you cannot write to it.
•
digio.MODE_DIGITAL_OUT
: You can set the line as logic high (+5 V) or as logic low (0 V). The
default level is logic low (0 V). When the instrument is in output mode, the line is actively driven
high or low.
•
digio.MODE_DIGITAL_OPEN_DRAIN
: Configures the line to be an open-drain signal. The line
can serve as an input, an output or both. When a digital I/O line is used as an input in open-drain
mode, you must write a
1
to it.