
2600AS-901-01 Rev. B / September 2008
Return to
18-3
Series 2600A System SourceMeter® Instruments Reference Manual
Section 18: TSP-NetTM
NOTE Set
TRUE
to abort any script
currently running on a remote TSP device.
3.
to send strings to a remote device. Using
sends strings to the device exactly as indicated, and you must supply any
needed termination characters or other lines. Use
to specify the
termination character. If you use
instead, the Series 2600A appends
termination characters to all strings sent to the command.
4.
Retrieve responses from the remote device using
. The Series 2600A
suspends operation until data is available or a timeout error is generated. You can check if
data is available from the remote device using
.
Disconnect from the remote device using
. Terminate all remote
connections using
Example script
The following example demonstrates how to connect to a remote non-TSP
TM
-enabled device, and
send and receive data from this device:
-- Disconnect all existing TSP-NetTM connections.
tspnet.reset()
-- Set tspnet timeout to 5 seconds.
tspnet.timeout = 5
-- Establish connection to another device with IP address 192.168.1.51
-- at port 1394.
id_instr = tspnet.connect("192.168.1.51",1394, "*rst\r\n")
-- Print the device ID from connect string.
print("ID is: ", id_instr)
-- Set termination character to CRLF. You must do this on a per
-- connection basis after connection has been made.
tspnet.termination(id_instr, tspnet.TERM_CRLF)
-- Send the command string to the connected device.
tspnet.write(id_instr,"*idn?" .. "\r\n")
-- Read the data available, then print it.
print("instrument write/read returns:: " , tspnet.read(id_instr))
-- Disconnect all existing TSP-Net sessions.
tspnet.reset()
Using TSP-Net vs. TSP-Link for communication with TSP-enabled devices
TSP Link is the preferred communication method when communicating between the Series 2600A
and another TSP
TM
-enabled instrument. Using TSP Link has certain advantages over using TSP-
Net, including:
•
Error checking:
When connected to a TSP-enabled device, all errors that occur on the
remote device are transferred to the error queue of the Series 2600A. The Series 2600A
indicates errors from the remote device by prefacing these errors with "Remote Error".
•
Digital I/O Triggering:
TSP Link connections have three TSP synchronization lines that are
available to each device on the TSP Link network. You can use any one of the TSP
synchronization lines to perform hardware triggering between devices on the TSP Link
network.