Section 7: Command reference
Model 2651A High Power System SourceMeter® Instrument Reference Manual
7-364
2651A-901-01 Rev. A / March 2011
Details
This command sends the command string to the remote instrument. A termination is added to the command
string when it is sent to the remote instrument (see
(on page 7-367)). Optionally, when a
format string is specified, the command waits for a response from the remote instrument. The Model 2651A
decodes the response message according to the format specified in the format string and returns this as return
values from the function (see
(on page 7-365) for format specifiers).
When this command is sent to a TSP-enabled instrument, the Model 2651A suspends operation until a timeout
error is generated or until the instrument responds, even if no format string is specified. The TSP prompt from the
remote instrument is read and thrown away. The Model 2651A places any remotely-generated errors into its
error queue. When the optional format string is not specified, this command is equivalent to
tspnet.write()
,
except that a termination is automatically added to the end of the command.
Example 1
tspnet.execute(myID, "runScript()")
Command remote device to run script named
runScript.
Example 2
tspnet.termination(myID, tspnet.TERM_CRLF)
tspnet.execute(myID, "*idn?")
print("tspnet.execute returns:",
tspnet.read(myID))
Print the
*idn?
string from the remote device.
Also see
(on page 7-365)
tspnet.idn()
This function retrieves the response of the remote device to *IDN?.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function Yes
Usage
idnString
= tspnet.idn(
connectionID
)
idnString
The returned *IDN? string
connectionID
The connection ID returned from
tspnet.connect()
Details
This function retrieves the response of the remote device to
*IDN?
.
Example
myID =
tspnet.connect("192.0.2.1")
print(tspnet.idn(myID))
tspnet.disconnect(myID)
Output:
KEITHLEY INSTRUMENTS INC.,MODEL
707B,00000170,01.10h