ection 7: Introduction to TSP operation Model 2450 Interactive SourceMeter® Instrument Referen
7-8 2450-901-01 Rev. B/September 2013
Running scripts using a remote interface
You can run any script using scriptVar.run(). Replace scriptVar with the name of a script that
is in nonvolatile or run-time memory.
Saving a script to nonvolatile memory
You can save scripts to nonvolatile memory. To keep a script through a power cycle, you must save
the script to nonvolatile memory.
To save a script to nonvolatile memory:
1. Create and load a script.
2. Send the command scriptVar.save(), where scriptVar is the name of the script.
Example: Save a user script to nonvolatile memory
Assume a script named test1 has been loaded. test1 is
saved into nonvolatile memory.
Saving a script to a USB drive
You can save scripts to a USB flash drive.
To save a script to an external USB drive:
1. Load a script.
2. Insert a flash drive into the USB port on the front panel.
3. Send the command scriptVar.save("/usb1/filename.tsp"), where scriptVar is the
variable referencing the script and filename is the name of the file.
Rename a script
To rename a script in the runtime environment:
1. Load the script into the runtime environment with a different name.
2. Delete the previous version of the script.
To rename a script in nonvolatile memory:
Send the commands:
scriptVar = script.load(file)
scriptVar.save()
Where:
scriptVar is the name of variable that references the script
file is the path and file name of the script file to load
For example, to load a script named test8 from the flash drive and save it to nonvolatile memory,
send the commands:
test8 = script.load("/usb1/test8.tsp")
test8.save()
If the new name is the same as a name that is already used for a script, an error message is
displayed.