Queries; Usb Flash Drive Path; Information On Scripting And Programming - Keithley 2450 Reference Manual

Interactive sourcemeter instrument
Table of Contents

Advertisement

Model 2450 Interactive SourceMeter® Instrument Reference Manual
Reading an attribute
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(display.lightstate)
Example 4: Read an attribute using a variable
light = display.lightstate
print(light)

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)

USB flash drive path

You can use the file commands to open and close directories and files, write data, or to read a file on
an installed USB flash drive.
The root folder of the USB flash drive has the absolute path:
"/usb1/"

Information on scripting and programming

If you need information about using scripts with your TSP-enabled instrument, see
scripting for TSP
If you need information about using the Lua programming language with the instrument, see
Fundamentals of programming for TSP
2450-901-01 Rev. B/September 2013
®
) enabled instruments do not have inherent query commands. Like any
Example of an output response message:
Note that your output may be different if you set your ASCII
precision setting to a different value.
(on page 7-4).
(on page 7-11).
Section 7: Introduction to TSP operation
Reads the status of the light state by passing
the attribute to the print function. If the display
light state is set to 50%, the output is:
display.STATE_LCD_50
This reads the light state by assigning the
attribute to a variable named light. If the
display light state is set to 25%, the output is:
display.STATE_LCD_25
1.00000e+01
Fundamentals of
7-3

Advertisement

Table of Contents
loading

Table of Contents