Section 14: TSP command reference
2470 High Voltage SourceMeter Instrument Reference Manual
14-278
2470-901-01 Rev. A /
May
2019
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)
end
Connect to a TSP-enabled 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)
end
Connect to a device that is not TSP-enabled.
Also see
(on page 14-94)
(on page 14-278)
tspnet.disconnect()
This function disconnects a specified TSP-Net session.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
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
(on page 14-277)