Tspnet.read() - Keithley 2450 Reference Manual

Interactive sourcemeter instrument
Table of Contents

Advertisement

Model 2450 Interactive SourceMeter® Instrument Reference Manual
Example
deviceID = tspnet.connect("192.0.2.1")
print(tspnet.idn(deviceID))
tspnet.disconnect(deviceID)
Also see
tspnet.connect()

tspnet.read()

This function reads data from a remote device.
Type
TSP-Link accessible
Function
No
Usage
value1 = tspnet.read(connectionID)
value1 = tspnet.read(connectionID, formatString)
value1, value2 = tspnet.read(connectionID, formatString)
value1, ..., valueN = tspnet.read(connectionID, formatString)
value1
value2
valueN
...
connectionID
formatString
Details
This command reads available data from the remote instrument and returns responses for the specified number
of arguments.
The format string can contain the following specifiers:
%[width]s
%[max width]t
%[max width]n
%d
2450-901-01 Rev. B/September 2013
(on page 8-237)
Affected by
The first value decoded from the response message
The second value decoded from the response message
The nth value decoded from the response message; there is one return value for
each format specifier in the format string
One or more values separated with commas
The connection ID returned from tspnet.connect()
Format string for the output, maximum of 10 specifiers
Read data until the specified length
Read data until the specified length or until punctuation is found, whichever comes first
Read data until a newline or carriage return
Read a number (delimited by punctuation)
Section 8: TSP command reference
Assume the instrument is at IP address 192.0.2.1.
The output that is produced when you connect to the
instrument and read the IDN string may appear as:
Keithley Instruments Inc., Model 2450,
00000170, 1.0.0
Where saved
Default value
8-241

Advertisement

Table of Contents
loading

Table of Contents