Model 2651A High Power System SourceMeter® Instrument Reference Manual Section 7: Command reference
2651A-901-01 Rev. A / March 2011 7-371
Any output from previous commands is discarded.
This command does not wait for the script to complete.
If you do not want the script to do anything immediately, make sure the script only defines functions for later use.
Use the tspnet.execute() function to execute those functions at a later time.
If no name is specified, the script will be loaded as the anonymous script.
Example
tspnet.tsp.runscript(myconnection, "mytest",
"print([[start]]) for d = 1, 10 do print([[work]]) end print([[end]])")
Load and run a script entitled mytest on the TSP-enabled instrument connected with myconnection.
Also see
tspnet.execute() (on page 7-363)
tspnet.write()
This function writes a string to the remote instrument.
Type TSP-Link accessible
Affected by Where saved Default value
Function Yes
Usage
tspnet.write(connectionID, inputString)
connectionID
The connection ID returned from tspnet.connect()
inputString
The string to be written
Details
The tspnet.write() function sends inputString to the remote instrument. It does not wait for command
completion on the remote instrument.
The Model 2651A sends inputString to the remote instrument exactly as indicated. The inputString must
contain any necessary new lines, termination, or other syntax elements needed to complete properly.
Because tspnet.write() does not process output from the remote instrument, do not send commands that
generate too much output without processing the output. This command can stop executing if there is too much
unprocessed output from previous commands.
Example
tspnet.write(myID, "runscript()\r\n")
Commands the remote instrument to run script
named "myID".
Also see
tspnet.connect() (on page 7-361)
tspnet.read()
(on page 7-365)