EasyManua.ls Logo

Keithley 2461

Keithley 2461
1109 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Model 2461
Interactive SourceMeter® Instrument Reference Manual Section 3:
Functions and features
2461-901-01 A/November 2015 3-97
Reading a bit pattern
The programming examples below illustrate how to read part or all of a bit pattern that has been
applied to the digital I/O port by an external instrument. The binary pattern is 111111 (63 decimal).
Line 1 (bit 1) is the least significant bit.
Using SCPI commands:
Configure all 6 lines as digital inputs:
DIGital:LINE1:MODE DIGital, IN
DIGital:LINE2:MODE DIGital, IN
DIGital:LINE3:MODE DIGital, IN
DIGital:LINE4:MODE DIGital, IN
DIGital:LINE5:MODE DIGital, IN
DIGital:LINE6:MODE DIGital, IN
Read the state of Line 2:
DIGital:LINE2:STATe?
Value returned is 1.
Read the state of Line 3:
DIGital:LINE3:STATe?
Value returned is 1.
Read the value applied to the entire port:
DIGital:READ?
Value returned is 63, which is the decimal equivalent of the binary bit pattern.
Using TSP commands:
-- Configure all six digital I/O lines as digital inputs.
-- You can also use a for loop.
digio.line[1].mode = digio.MODE_DIGITAL_IN
digio.line[2].mode = digio.MODE_DIGITAL_IN
digio.line[3].mode = digio.MODE_DIGITAL_IN
digio.line[4].mode = digio.MODE_DIGITAL_IN
digio.line[5].mode = digio.MODE_DIGITAL_IN
digio.line[6].mode = digio.MODE_DIGITAL_IN
-- Read and then print the state of Line 2 (bit 2).
b2 = digio.line[2].state
print(b2)
The value returned is digio.STATE_HIGH.
-- Print the state of Line 3 (bit 3).
print(digio.line[3].state)
The value returned is digio.STATE_HIGH.
-- Read and then print the value applied to the entire port.
port = digio.readport()
print(port)
The value returned is 63, which is the decimal equivalent of the binary bit pattern.

Table of Contents

Other manuals for Keithley 2461

Related product manuals