Tspnet.read() - Keithley 3700A Series Reference Manual

System switch/multimeter
Hide thumbs Also See for 3700A Series:
Table of Contents

Advertisement

Section 11: TSP command reference
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
A maximum of 10 format specifiers can be used for a maximum of 10 return values.
If formatString is not provided, the command returns a string that contains the data until a new
line is reached. If no data is available, the Series 3700A pauses operation until the requested data is
available or until a timeout error is generated. Use tspnet.timeout to specify the timeout period.
When the Series 3700A reads from a TSP-enabled remote instrument, the Series 3700A removes
Test Script Processor (TSP
into its own error queue. The Series 3700A prefaces errors from the remote device with "Remote
Error," followed by the error number and error description.
11-438
(on page 11-434)
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)
®
) prompts and places any errors it receives from the remote instrument
Series 3700A System Switch/Multimeter Reference Manual
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 identification string may appear
as:
KEITHLEY INSTRUMENTS,MODEL
3706A,00000170,01.10h
Where saved
Default value
3700AS-901-01 Rev. D/June 2018

Advertisement

Table of Contents
loading

Table of Contents