Keithley 2450 Reference Manual page 212

Interactive sourcemeter instrument
Table of Contents

Advertisement

Model 2450 Interactive SourceMeter® Instrument Reference Manual
Digital I/O programming example
The programming commands below illustrate how to set bit B1 of the digital I/O port high, and then
read the value.
Using SCPI commands:
:DIGital:LINE1:MODE DIGital, OUT
:DIGital:LINE1:STATe 1
:DIGital:LINE1:MODE DIGital, IN
:DIGital:LINE1:STATe?
Using TSP commands:
-- Set bit B1 high
digio.line[1].mode = digio.MODE_DIGITAL_OUT
digio.line[1].state = digio.STATE_HIGH
-- Read digital I/O port
digio.line[1].mode = digio.MODE_DIGITAL_IN
print(digio.line[1].state)
Digital I/O bit weighting
Bit weighting for the digital I/O lines is shown in the following table.
Line #
Bit
1
B1
2
B2
3
B3
4
B4
5
B5
6
B6
2450-901-01 Rev. B/September 2013
Pin
Decimal
Hexadecimal
1
1
0x01
2
2
0x02
3
4
0x04
4
8
0x08
6
16
0x10
8
32
0x20
Section 3: Functions and features
Binary
000001
000010
000100
001000
010000
100000
3-67

Advertisement

Table of Contents
loading

Table of Contents