Tspnet.readavailable() - Keithley 708B Reference Manual

Switching matrix
Hide thumbs Also See for 708B:
Table of Contents

Advertisement

Models 707B and 708B Switching Matrix Reference Manual
Details
This command reads available data from the device and returns the number of arguments.
The format string can contain the following identifiers:
%[width]s
%[max width]t
%[max width]n
%d
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 707B or 708B holds off 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 device, the Model 707B or 708B removes TSP prompts and places
any errors received from the remote device into its own error queue. The Model 707B or 708B 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))
Also see
tspnet.connect()
tspnet.disconnect()
tspnet.timeout
tspnet.write()

tspnet.readavailable()

This function checks to see if data is available from the remote device.
Type
TSP-Link accessible
Function
Yes
Usage
bytesAvailable = tspnet.readavailable(connectionID)
bytesAvailable
connectionID
Details
This command checks to see if any output data is available from the device. No data is read from the instrument.
This allows TSP scripts to continue to run without waiting on a remote command to finish.
707B-901-01 Rev. A / August 2010
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)
(on page 7-229)
(on page 7-230)
(on page 7-236)
(on page 7-240)
Affected by
The return code from the function call
The connection ID returned from tspnet.connect()
Send the "*idn?\r\n" message to the
device connected as myID.
Display the response that is read from myID
(based on the *idn? message).
Where saved
Default value
Section 7: Command reference
7-233

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

707b

Table of Contents