Tspnet.read() - Keithley 2651A Reference Manual

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Model 2651A High Power System SourceMeter® Instrument Reference Manual
Also see
tspnet.connect()

tspnet.read()

This function reads data from a remote device.
Type
TSP-Link accessible
Function
Yes
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 identifiers:
%[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 containing the data until a new line is reached. If no data is available, the
Model 2651A pauses operation until the requested data is available or until a timeout error is generated. Use
tspnet.timeout to specify the timeout period.
When reading from a TSP-enabled remote instrument, the Model 2651A removes Test Script Processor (TSP
prompts and places any errors received from the remote instrument into its own error queue. The Model 2651A
prefaces errors from the remote device with "Remote Error," and follows this with the error number and error
description.
Example
tspnet.write(myID, "*idn?\r\n")
print("write/read returns:", tspnet.read(myID))
2651A-901-01 Rev. A / March 2011
(on page 7-361)
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 per
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 specific length
Read data until the specific length or delimited by punctuation
Read data until a newline or carriage return
Read a number (delimited by punctuation)
Where saved
Default value
Send the "*idn?\r\n" message to the
instrument connected as myID.
Display the response that is read from myID
(based on the *idn? message).
Section 7: Command reference
7-365
®
)

Advertisement

Table of Contents
loading

Table of Contents