User manual

Series 3700 System Switch/Multimeter Reference Manual Section 2: TSP Programming Fundamentals
3700S-901-01 Rev. C / July 2008 2-27
Running a user script from the Series 3700 front panel
Use the following commands to enter or delete a name in the User menu option
from the LOAD key:
display.loadmenu.add(displayname, chunk)
display.loadmenu.delete(displayname)
Where:
displayname is the name to be added to (or deleted from) the User menu.
chunk is the name of the chunk (Lua executable code).
It does not matter what order the items are added to the User menu, as they will
be displayed in alphabetical order when the menu is selected.
Example:
Assume a user script named "Test9" has been loaded into the run-time
environment. Add the script name to the User menu for the chunk as follows:
display.loadmenu.add("Test9", "Test9()")
To run the chunk from the front panel:
1. Press the LOAD key.
2. Select USER and press the ENTER key.
3. Select the user chunk from list and press the ENTER key. The chunk is
loaded for front panel execution.
NOTE If you're used to using print in Test Script Builder, note that the
output of the prints using this procedure will not function the same
as when you're in Test Script Builder. You may find that it makes
more sense to use Test Script Builder to get the output you need.
4. Press the RUN key to execute.
To run a script directly without adding it to the USER menu:
1. Press the LOAD key.
2. Select SCRIPTS and press the ENTER key. There may be a short pause
before a menu is displayed that represents the scripts in the instrument.
3. Select the script from the list and press the ENTER key. Now the script is
loaded for front panel execution.
NOTE If you're used to using print in Test Script Builder, note that the
output of the prints using this procedure will not function the same
as when you're in Test Script Builder. You may find that it makes
more sense to use Test Script Builder to get the output you need.
4. Press the RUN key to execute.