
19-232
Return to
2600AS-901-01 Rev. B / September 2008
Section 19: Remote Commands
Series 2600A System SourceMeter® Instruments Reference Manual
tspnet.tsp.runscript
Function
Load and run a script on a remote instrument.
TSP-Link
accessibility
This function can be accessed from a remote TSP-Link node.
Usage
tspnet.tsp.runscript(connection_id, script)
tspnet.tsp.runscript(connection_id, name, script)
connection_id
Integer value used as a handle for other
tspnet
commands.
name
The name the script will be assigned.
script
The body of the script as a string.
Remarks
• This convenience command downloads a script to a remote instrument and runs it. It
automatically adds the appropriate
loadscript
and
endscript
around the script, captures
any errors, and reads back any prompts. No additional substitutions are done on the text.
• The script is automatically loaded, compiled, and run.
• Any output from previous commands will be discarded.
• This command will not wait for the script to complete.
• To load only and run at a later time, simply make sure the script contains only functions. Use
to execute those functions at a later time.
• This command is appropriate only for TSP
TM
-enabled instruments.
• If no name is specified, the script will be unnamed.
• Errors:
Invalid Specified Connection
Write Failed, Timeout
Write Failed
Read Failed, Timeout
Read Failed, Aborted
Remote Error,
<remote error generated by command>
Example
tspnet.tsp.runscript(myconnection, 'mytest',
'print([[start]]) for d = 1, 10 do print([[work]]) end print([[end]])')