8: TSP command reference Model 2450 Interactive SourceMeter® Instrument
8-238 2450-901-01 Rev. B/September 2013
If neither a portNumber nor an initString is provided, the remote device is assumed to be a Keithley
Instruments TSP-enabled device. Depending on the state of the tspnet.tsp.abortonconnect attribute, the
Model 2450 sends an abort command to the remote device on connection.
The Model 2450 also enables TSP prompts on the remote device and event management. The Model 2450
places remote errors and events from the TSP-enabled device in its own event queue and prefaces these events
with Remote Error, followed by an event description.
Do not manually change either the prompt functionality (localnode.prompts) or show events by changing
localnode.showerrors or localnode.showevents on the remote TSP-enabled device. If you do this,
subsequent tspnet.tsp.* commands using the connection may fail.
You can simultaneously connect to a maximum of 32 remote devices.
Example 1
instrumentID = tspnet.connect("192.0.2.1")
if instrumentID then
-- Use instrumentID as needed here
tspnet.disconnect(instrumentID)
Connect to a TSP-
device.
Example 2
instrumentID = tspnet.connect("192.0.2.1", 1394,
"*rst\r\n")
if instrumentID then
-- Use instrumentID as needed here
tspnet.disconnect(instrumentID)
Connect to a device that is
not TSP-enabled.
Also see
localnode.prompts (on page 8-71)
localnode.showevents (on page 8-73)
tspnet.tsp.abortonconnect (on page 8-245)
tspnet.disconnect() (on page 8-238)
tspnet.disconnect()
This function disconnects a specified TSP-Net session.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
tspnet.disconnect(connectionID)
The connection ID returned from tspnet.connect()
Details
This function disconnects the two devices by closing the connection. The connectionID is the session handle
returned by tspnet.connect().
For TSP-enabled devices, this aborts any remotely running commands or scripts.