![background image](http://html2.mh-extra.com/html/keithley/2657a/2657a_reference-manual_4007750672.webp)
Model 2657A High Power System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2657A-901-01 Rev. B/December 2012
7-359
Example
tspnet.write(testdevice, "print([[hello]])")
print(tspnet.readavailable(testdevice))
tspnet.clear(testdevice)
print(tspnet.readavailable(testdevice))
Write data to a device, then print how much is
available.
Output:
6.00
Clear data and print how much data is
available again.
Output:
0.00
Also see
(on page 7-363)
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
Function
Yes
Usage
connectionID
= tspnet.connect(
ipAddress
)
connectionID
= tspnet.connect(
ipAddress
,
portNumber
,
initString
)
connectionID
The connection ID to be used as a handle in all other
tspnet
function calls
ipAddress
IP address to which to connect
portNumber
Port number (default 5025)
initString
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 2657A does not perform any extra processing, prompt handling, error handling, or sending of commands.
Additionally, 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 2657A sends an
abort
command to the remote device on connection.
The Model 2657A also enables TSP prompts on the remote device and error management. The Model 2657A
places remote errors from the TSP-enabled device in its own error queue and prefaces these errors with
Remote
Error
, followed by an error description.
Do not manually change either the prompt functionality (
localnode.prompts
) or show errors by changing
localnode.showerrors
on the remote TSP-enabled device. If you do this, subsequent
tspnet.tsp.*
commands using the connection may fail.
You can simultaneously connect to a maximum of 32 remote devices.
Содержание 2657A
Страница 3: ......