2470 High Voltage SourceMeter Instrument Reference Manual
Example
tspnet.write(testdevice, "print([[hello]])")
print(tspnet.readavailable(testdevice))
tspnet.clear(testdevice)
print(tspnet.readavailable(testdevice))
Also see
tspnet.connect()
tspnet.readavailable()
tspnet.write()
tspnet.connect()
This function establishes a network connection with another LAN instrument or device through the LAN interface.
Type
TSP-Link accessible
Function
No
Usage
connectionID = tspnet.connect("ipAddress")
connectionID = tspnet.connect("ipAddress", portNumber, "initString")
connectionID
ipAddress
portNumber
initString
Details
This command connects a device to another device through the LAN interface. If the portNumber is
23, the interface uses the Telnet protocol and sets appropriate termination characters to
communicate with the device.
If a portNumber and initString are provided, it is assumed that the remote device is not
TSP-enabled. The 2470 does not perform any extra processing, prompt handling, error handling, or
sending of commands. In addition, the tspnet.tsp.* commands cannot be used on devices that
are not TSP-enabled.
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 2470 sends an abort command to the remote device
on connection.
The 2470 also enables TSP prompts on the remote device and event management. The 2470 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.
2470-901-01 Rev. A / May 2019
(on page 14-277)
(on page 14-282)
(on page 14-287)
Affected by
The connection ID to be used as a handle in all other tspnet function calls
IP address to which to connect in a string
Port number (default 5025)
Initialization string to send to ipAddress
Section 14: TSP command reference
Write data to a device, then print how much
is available.
Output:
6.00000e+00
Clear data and print how much data is
available again.
Output:
0.00000e+00
Where saved
Default value
14-277
Need help?
Do you have a question about the Keithley SourceMeter 2470 and is the answer not in the manual?