User manual

Series 3700 System Switch/Multimeter Reference Manual Section 13: Instrument Control Library (ICL)
3700S-901-01 Rev. C / July 2008 13-301
tspnet.connect()
Remarks
This command connects a device to another device by way of the LAN interface (using
the optionally-specified port number). The default port number is 5025. If the port
number is 23, the interface will use the Telnet protocol (and set appropriate
termination characters) to communicate with the device.
If a port number and initialization string are provided, the remote device is assumed to
be non-TSP-enabled. The Series 3700 does not perform any extra processing, prompt
handling, error handling, or sending of commands. Additionally, the tspnet.tsp
commands do not apply for use on this this remote device.
If no port number and initialization string is provided, the remote device is assumed to
be a Keithley Instruments TSP-enabled device. Depending on the state of
tspnet.tsp.abortonconnect (on page 10-14), the Series 3700 sends an
abort() to the remote device upon connection. The Series 3700 also enables TSP
prompts on the remote device and error management. The Series 3700 places remote
errors from the TSP-enabled device in its own error queue and prefaces these errors
with "Remote Error", followed by an error description. Do not manually change either
the prompt functionality (localnode.prompts) or show errors functionality
(localnode.showerrors) on the remote TSP-enabled device, or subsequent
tspnet.tsp.* commands using the connection may fail.
You can simultaneous connect to a maximum of 32 remote devices.
Errors:
Connection Failed
Connection Failed, Timeout
Invalid IP Address or Port Number
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.disconnect()
Function
Device disconnection.
Usage
tspnet.disconnect(<connection id>)
connection id: Integer value used as a handle for other tspnet commands
Remarks
This command disconnects the two devices by closing the connection.
For Keithley Instruments TSP
TM
devices, this results in any remotely running
commands or scripts being aborted (terminated).
Errors:
Invalid Specified Connection
Example
tspnet.disconnect(mydevice)