
Model 2450 Interactive SourceMeter® Instrument Reference Manual
Section 8: TSP command reference
2450-901-01 Rev. B/September 2013
8-43
digio.line[N].mode
This attribute sets the digital I/O line to be a digital line or trigger model line and sets the line as an input, output,
or open-drain. You can also use this attribute to configure synchronous triggering modes.
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
lineState
= digio.line[
N
].mode
digio.line[
N
].mode =
lineState
lineState
Digital input:
digio.MODE_DIGITAL_IN
Digital output:
digio.MODE_DIGITAL_OUT
Digital open-drain:
digio.MODE_DIGITAL_OPEN_DRAIN
Trigger model input:
digio.MODE_TRIGGER_IN
Trigger model output:
digio.MODE_TRIGGER_OUT
Trigger model 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
Use this command to set the line as a digital line or as a trigger line, and configure it as an input, output, or open-
drain. A digital line allows direct control of the digital I/O lines; a trigger line controls the digital I/O lines through
trigger commands.
The following settings of
lineState
set the line for direct control as a digital line:
•
digio.MODE_DIGITAL_IN
•
digio.MODE_DIGITAL_OUT
•
digio.MODE_DIGITAL_OPEN_DRAIN
The following settings of
lineState
set the line as a trigger line:
•
digio.MODE_TRIGGER_IN
This line state uses the edge setting specified by
trigger.digin[
N
].edge
attribute.
•
digio.MODE_TRIGGER_OUT
•
digio.MODE_TRIGGER_OPEN_DRAIN
When configured as an open-drain, the line becomes an open-drain signal with a 100 k
Ω
pull-up resistor. This is
true when the line is configured for direct-control or for use as a trigger line. When used as a trigger line, the line
uses the edge setting like
digio.MODE_TRIGGER_IN
.
When the line is set as a synchronous acceptor, the line detects the falling-edge input triggers and automatically
latches and drives the trigger line low; asserting an output trigger releases the latched line. When set as a
synchronous master, the line detects rising-edge triggers as input; for output, the line asserts a TTL-low pulse.
Example
digio.line[1].mode = digio.MODE_TRIGGER_OUT
Set digital I/O line 1 to be an output trigger
line.
Also see
(on page 8-171)
(on page 3-62)