
Series 3700A System Switch/Multimeter Reference Manual
Section 10: Instrument programming
3700AS-901-01 Rev. D/June 2018
10-63
Using TSP-Net with any ethernet-enabled device
Refer to
(on page 11-8) for more details about the commands presented in this
section.
To communicate to a remote ethernet-enabled device from the Series 3700A, perform the following
steps:
1. Connect to the remote device through the LAN port. If you are connecting:
▪
Directly from the Series 3700A to an ethernet-enabled device, use an ethernet crossover
cable.
▪
The Series 3700A to any other device on the LAN, use a straight-through ethernet cable and
a hub.
2. Establish a new connection to a remote device at a specific IP address using
tspnet.connect()
.
3. If the device is not TSP-enabled, you must also provide the port number. If not, the Series 3700A
assumes the remote device is TSP-enabled and enables TSP prompts and error handling.
If the Series 3700A is not able to make a connection to the remote device, it generates a timeout
error. Use
tspnet.timeout
to set the timeout value. The default timeout value is 20 seconds.
Set
tspnet.tsp.abortonconnect
to 1 to abort any script currently running on a remote TSP
device.
4. Use
tspnet.write()
or
tspnet.execute()
to send strings to a remote device.
tspnet.write()
sends strings to the device exactly as indicated, and you must supply any
needed termination characters or other lines. Use
tspnet.termination()
to specify the
termination character. If you use
tspnet.execute()
(on page 11-436) instead, the Series
3700A appends termination characters to all strings sent to the command.
5. Retrieve responses from the remote device using
tspnet.read()
. The Series 3700A suspends
operation until data is available or a timeout error is generated. You can check if data is available
from the remote device using
tspnet.readavailable()
.
Disconnect from the remote device using
tspnet.disconnect()
. Terminate all remote
connections using
tspnet.reset()
.