Model 2651A High Power System SourceMeter® Instrument Reference Manual
Section 7: Command reference
2651A-901-01 Rev. A / March 2011
7-363
tspnet.disconnect()
This function disconnects the TSP-Net session specified.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function Yes
Usage
tspnet.disconnect(
connectionID
)
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.
Example
testID = tspnet.connect("192.0.2.0")
-- Use the connection
tspnet.disconnect(testID)
Create a TSP-Net session.
Close the session.
Also see
tspnet.execute()
This function executes a command string on the remote device.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function Yes
Usage
tspnet.execute(
connectionID
,
commandString
)
value1
= tspnet.execute(
connectionID, commandString, formatString
)
value1, value2
= tspnet.execute(
connectionID, commandString, formatString
)
value1, ..., valuen
= tspnet.execute(
connectionID, commandString, formatString
)
connectionID
The connection ID returned from
tspnet.connect()
commandString
The command to send to the remote device
value1
The first value decoded from the response message
value2
The second value decoded from the response message
valuen
The nth value decoded from the response message; there is one return value per
format specifier in the format string
...
One or more values separated with commas
formatString
Format string for the output