![Keithley 707B Скачать руководство пользователя страница 486](http://html.mh-extra.com/html/keithley/707b/707b_reference-manual_661685486.webp)
Models 707B and 708B Switching Matrix Reference Manual
Section 7: Command reference
707B-901-01 Rev. A / August 2010
7-233
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
Read data until the specific length
%[max width]t
Read data until the specific length or delimited by punctuation
%[max width]n
Read data until a newline or carriage return
%d
Read a number (delimited by punctuation)
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))
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).
Also see
(on page 7-236)
tspnet.readavailable()
This function checks to see if data is available from the remote device.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function Yes
Usage
bytesAvailable = tspnet.readavailable(connectionID)
bytesAvailable
The return code from the function call
connectionID
The connection ID returned from
tspnet.connect()
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.