Section 6: Instrument programming
Models 707B and 708B Switching Matrix Reference Manual
6-54
707B-901-01 Rev. B / January 2015
-- 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 prints it.
print("instrument write/read returns:: , tspnet.read(id_instr))
-- Disconnect all existing TSP-Net sessions.
tspnet.reset()
TSP-Net compared to TSP-Link to communicate with TSP-enabled
devices
The TSP-Link
®
network interface is the preferred communication method for most applications where
communication occurs between the Model 707B or 708B and another TSP-enabled instrument.
One of the advantages of using the TSP-Link network interface is that TSP-Link connections have
three synchronization lines that are available to each device on the TSP-Link network. You can use
any one of the synchronization lines to perform hardware triggering between devices on the TSP-Link
network. Refer to
(on page 3-13) for details.
However, if the distance between the Model 707B or 708B and the TSP-enabled device is longer than
15 feet, use TSP-Net commands.
TSP-Net instrument commands: General device control
The following instrument commands provide general device control:
(on page 7-228)
(on page 7-229)
(on page 7-230)
(on page 7-231)
(on page 7-232)
(on page 7-232)
(on page 7-233)
(on page 7-234)
(on page 7-234)
(on page 7-235)
(on page 7-239)
TSP-Net instrument commands: TSP-enabled device control
The following instrument commands provide TSP-enabled device control:
(on page 7-236)
(on page 7-237)