User manual
Series 3700 System Switch/Multimeter Reference Manual Section 2: TSP Programming Fundamentals
3700S-901-01 Rev. C / July 2008 2-23
Saving a named script
Only a named script can be saved in nonvolatile memory of the Series 3700.
After creating and loading a named script, use one of the following commands to
save it.
myscript.save() -- To save script in internal
memory
myscript.save('filename') -- To save script on flash drive
Where:
myscript is the user-defined name of the script.
filename is a filename for the script to save it on a user-supplied USB
flash drive.
The save command will save the script to internal nonvolatile memory if no
filename is specified. If a script is not saved in nonvolatile memory, the script will
be lost when the Series 3700 is turned off.
The myscript.save() command saves the script under the original name that
was created and loaded. The myscript.save('filename') shell command
is used to save the script to a user-supplied USB flash drive. If you save the
script to a filename that already exists, it will be overwritten. The filename may
have an absolute or relative path to the current working directory. If using an
absolute path, include "/usb1/" at the beginning to denote the flash drive. Also, if
the filename includes an extension, it must be ".tsp"; otherwise, an error occurs.
If no extension is specified, the ".tsp" extension will be added.
Examples:
Assume a script named "test1" has been created and loaded. The following
command saves the script in nonvolatile memory:
test1.save()
To save the script named "test1" under a filename ("test2") on a user-
supplied USB flash drive, send the following command:
test1.save('/usb1/test2.tsp')
To save the anonymous script, provide a valid name for the name attribute
of the anonymous script. Once the anonymous script is named, it can be
saved. For example, to save the anonymous script as "MyTest":
script.anonymous.name = 'MyTest'
script.anonymous.save()
To execute anonymous script that was just saved as 'MyTest':
script.user.scripts.MyTest()