User manual
Section 10: TSP-Net Series 3700 System Switch/Multimeter Reference Manual
10-12 3700S-901-01 Rev. C / July 2008
tspnet.timeout
Remarks
This setting sets the duration the tspnet.connnect, tspnet.read, and
tspnet.execute commands will wait for a response. The time is specified in
seconds. The default value is 5.0 seconds. The timeout may contain fractional
seconds but is only accurate to the nearest 10mS. The timeout may be between 0.0
and 30 seconds.
Errors:
Invalid Timeout
Example
tspnet.timeout = 10.0
Instrument Control Library - TSP-specific device control
tspnet.tsp.runscript()
Function
Load and runs a script on a device.
Usage
tspnet.tsp.runscript(<connection id>, [<name>,] <script>)
connection id: Integer value used as a handle for other tspnet commands
name: Optional parameter name from a listed group
script: The actual script itself as a string, enclosed in quotes
Remarks
This convenience command downloads a script to a device 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. If there are no runnable lines
(contains only functions), running has no effect.
To load only and run at a later time, simply make sure the script contains only
functions. Use tspnet.execute() to execute those functions at a later time.
This command is appropriate only for TSP
TM
-enabled devices.
If no name is specified, one will be generated internally.
Errors:
Invalid Specified Connection
Write Failed, Timeout
Write Failed
Read Failed, Timeout
Read Failed, Aborted
Read Failed
Remote Error, <remote error generated by command>
Example
tspnet.tsp.runscript(mytspdevice, 'mytest',
'print([[start]]) for d = 1,10 do print([[work]]) end
print[[end]]')