User manual
Series 3700 System Switch/Multimeter Reference Manual Section 2: TSP Programming Fundamentals
3700S-901-01 Rev. C / July 2008 2-3
Run-time environment
A feature of all scripting environments is the run-time environment. In the TSP
TM
,
the run-time environment is simply a temporary collection of global variables. A
global variable can be used to remember a value as long as the unit is powered
on and the variable is not assigned a new value. To instruct the instrument to
read the ASCII precision setting and store the result in a global variable named
"x", send:
x = format.asciiprecision
A global variable can be removed from the environment by assigning it the nil
value. For example, the command x = nil will remove the global variable x
from the run-time environment. When the unit is turned off, the entire run-time
environment will be lost.
Queries
TSP
TM
-enabled instruments do not have inherent query commands. Like any
other scripting environment, the print command and other related print
commands are used to generate output. The print command creates one
response message.
The following chunk is an example that generates an output response message:
x = 10 print(x) 1.000000000e+001
NOTE The output (indicated by the ) may vary, depending on the ASCII
precision setting.