Queries - Keithley 3700A Series Reference Manual

System switch/multimeter
Hide thumbs Also See for 3700A Series:
Table of Contents

Advertisement

Section 9: Introduction to TSP operation
Example 2
You can use the results of a function-based command directly or assign variables to the results for
later access. The following code defines x and prints it.
x = math.abs(-100)
print(x)
Attributes
Attribute-based commands are commands that set the characteristics of an instrument feature or
operation. For example, a characteristic of TSP-enabled instruments is the model number
(localnode.model).
Attributes can be read-only, read-write, or write-only. They can be used as a parameter of a function
or assigned to another variable.
To set the characteristics, attribute-based commands define a value. For many attributes, the value is
in the form of a number or a predefined constant.
Example 1: Set an attribute using a number
beeper.enable = 0
Example 2: Set an attribute using a constant
format.data = format.REAL64
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
print(format.data)
Example 4: Read an attribute using a variable
fd = format.data

Queries

Test Script Processor (TSP
other scripting environment, the print() and printnumber() commands generate output in the
form of response messages. Each print() command creates one response message.
Example
x = 10
print(x)
9-2
Series 3700A System Switch/Multimeter Reference Manual
Output:
100
®
) enabled instruments do not have inherent query commands. Like any
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.
This attribute controls the beeps that occur
when front-panel controls are selected. Setting
this attribute to 0 turns off the beeper.
Using the constant REAL64 sets the print format
to double precision floating-point format.
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.
This reads the data format by assigning the
attribute to a variable named fd.
3700AS-901-01 Rev. D/June 2018

Advertisement

Table of Contents
loading

Table of Contents