12: SCPI command reference 2470 High Voltage SourceMeter Instrument
12-26 2470-901-01 Rev. A / May 2019
:DIGital:LINE<n>:STATe
This command sets a digital I/O line high or low when the line is set for digital control and returns the state on the
digital I/O lines.
Type Affected by Where saved Default value
Usage
:DIGital:LINE<n>:STATe <state>
:DIGital:LINE<n>:STATe?
The digital I/O line: 1 to 6
Clear the bit (bit low): 0
Set the bit (bit high):
Details
When the line mode for a digital I/O line is set to digital output (:DIG:LINE<n>:MODE DIG, OUT),
you can set the line high or low using the <state> parameter. When the line mode is set to digital
input (:DIG:LINE<n>:MODE DIG, IN), you can query the state of the digital input line.
When a reset occurs, the digital line state can be read as high because the digital line is reset to a
digital input. A digital input floats high if nothing is connected to the digital line.
This returns the integer equivalent values of the binary states on all six digital I/O lines.
Set the state to zero (0) to clear the bit; set the state to one (1) to set the bit.
Example 1
:DIG:LINE1:MODE DIG, OUT
:DIG:LINE1:STAT 1
Set digital I/O line 1 as a digital output line.
Sets line 1 (bit B1) of the digital I/O port high.
Example 2
:DIG:LINE1:STAT?
Set digital I/O line 1 as a digital input line.
Query the state of line 1 on the digital I/O port.
Output:
Also see
Digital I/O port configuration (on page 8-13)
:DIGital:LINE<n>:MODE (on page 12-24)
:DIGital:READ? (on page 12-27)
:DIGital:WRITe <n> (on page 12-27)
:TRIGger:DIGital<n>:IN:EDGE (on page 12-171)