8: TSP command reference Model DMM7510 7½ Digit Graphical Sampling Multimeter
8-354 DMM7510-901-01 Rev. B / May 2015
tspnet.connect()
This function establishes a network connection with another LAN instrument or device through the LAN interface.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
connectionID = tspnet.connect(ipAddress)
connectionID = tspnet.connect(ipAddress, portNumber, initString)
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
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 Model DMM7510 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 Model DMM7510 sends an abort command to the
remote device on connection.
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)
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-223)
localnode.showevents (on page 8-227)
tspnet.tsp.abortonconnect (on page 8-361)
tspnet.disconnect() (on page 8-355)