High Voltage SourceMeter Instrument Reference Manual Section 8:
2470-901-01 Rev. A / May 2019 8-25
Using SCPI commands to set the state of each line individually:
:DIGital:LINE6:STATe 1
:DIGital:LINE5:STATe 1
:DIGital:LINE4:STATe 0
:DIGital:LINE3:STATe 1
:DIGital:LINE2:STATe 0
:DIGital:LINE1:STATe 1
Using SCPI commands to set all six lines at once by writing the decimal equivalent of the bit
pattern to the port:
:DIGital:WRITe 53
Using TSP commands to configure all six lines as digital outputs:
-- Send for loop as a single chunk or include in a script.
for i = 1, 6 do
digio.line[i].mode = digio.MODE_DIGITAL_OUT
end
Using TSP commands to set the state of each line individually:
digio.line[1].state = digio.STATE_HIGH
digio.line[2].state = digio.STATE_LOW
digio.line[3].state = digio.STATE_HIGH
-- You can use 0 instead of digio.STATE_LOW.
digio.line[4].state = 0
-- You can use 1 instead of digio.STATE_HIGH.
digio.line[5].state = 1
digio.line[6].state = 1
Using TSP commands to set all six lines at once by writing the decimal equivalent of the bit
pattern to the port:
-- You can write binary, decimal or hexadecimal values, as shown below.
-- Use binary value.
digio.writeport(0b110101)
-- Use decimal value.
digio.writeport(53)
-- Use hexadecimal value.
digio.writeport(0x35)