User manual

Section 10: TSP-Net Series 3700 System Switch/Multimeter Reference Manual
10-6 3700S-901-01 Rev. C / July 2008
tspnet.connect()
Example
To connect to a TSP-enabled device:
mytspdevice = tspnet.connect('10.80.64.216')
To connect to a non-TSP-enabled device:
mydevice = tspnet.connect("192.168.1.51",1394, "*rst\r\n")
tspnet.idn()
Function
Retrieves response of remote device to '*IDN?'
Usage
<idn string> = tspnet.idn(<connection id>)
idn_string: Response as a string type
connection id: Integer value used as a handle for other tspnet commands
Remarks
Sends the '*idn?' string to the remote device and retrieves its response.
Errors:
Invalid Specified Connection
Connection Not Available
Connection Failed, Aborted
Write Failed, Timeout
Write Failed
Read Failed, Timeout
Read Failed
Read Failed, Aborted
Example
Retrieve and print response of 'IDN?*' from the remote device:
print(tspnet.idn(mydevice))
KEITHLEY INSTRUMENTS INC.,MODEL 3706,34345656,01.02a
tspnet.execute()
Function
Executes a command string on the remote device.
Usage
[variable =] tspnet.execute(<connection id>, <command
string>, [<format string>])
connection id: Integer value used as a handle for other tspnet commands
command string: Command to send to instrument.
format string: Definition of format string for the input field using zeros (0), the decimal
point (.), the polarity sign (+), and 'E' for exponent.