Model 2651A High Power System SourceMeter® Instrument Reference Manual
Section 5: Remote commands
2651A-901-01 Rev. A / March 2011
5-3
To read an attribute, you can use the attribute as the parameter of a function, or assign it to another
variable.
Example 1: Read an attribute using a function
print(format.data)
Reads the data format by passing the attribute
to the print function. If the data format is set to
3, the output is:
3.00
This shows that the data format is set to double
precision floating point.
Example 2: Read an attribute using a variable
fd = format.data
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()
command and other related commands generate output in
the form of response messages. Each
print()
command creates one response message.
Example
x = 10
print(x)
Example of an output response message:
1.01
Note that your output might be different if you set your ASCII
precision setting to a different value.
Information on scripting and programming
If you need information on using scripts with Model 2651A, see
Fundamentals of scripting for TSP
If you need information on using the Lua programming language with Model 2651A, see
Fundamentals of programming for TSP
(on page 6-14).
About remote commands
This section contains an overview of the instrument commands organized into to groups, with a brief
description of each group and links to the detailed command descriptions in the
(see "Commands" on page 7-8) in this manual.
Beeper control
The beeper commands allow you to enable or disable and sound the instrument beeper.
(on page 7-8)