Model 2601B-PULSE System SourceMeter Instrument Reference Manual Section 9: Introduction to TSP operation
2601B-PULSE-901-01A April 2020 9-3
To read an attribute, you can use the attribute as the parameter of a function, or assign it to
another variable.
Example 3: Read an attribute using a function
Reads the data format by passing the attribute to the print function. If the data format is set to 3, the output is:
3.00000e+00
This shows that the data format is set to double precision floating point.
Example 4: Read an attribute using a variable
This reads the data format by assigning the attribute to a variable named fd.
Queries
Test Script Processor (TSP
®
) enabled instruments do not have inherent query commands. Like any
other scripting environment, the print() and printnumber() commands generate output in the
form of response messages. Each print() command creates one response message.
Example
Example of an output response message:
10
Note that your output may be different if you set your
ASCII precision setting to a different value.
Information on scripting and programming
If you need information about using scripts with your TSP-enabled instrument, see Fundamentals of
scripting for TSP (on page 10-1).
If you need information about using the Lua programming language with the instrument, see
Fundamentals of programming for TSP (on page 10-13).
About TSP commands
This section contains an overview of the TSP commands for the instrument. The commands are
organized into groups, with a brief description of each group. Each section contains links to the
detailed descriptions for each command in the TSP command reference section of this documentation
(see TSP commands (on page 11-8)).
Beeper control
The beeper commands allow you to enable or disable and sound the instrument beeper.
beeper.beep() (on page 11-8)
beeper.enable (on page 11-8)