Userstring.catalog() - Keithley 2450 Reference Manual

Interactive sourcemeter instrument
Table of Contents

Advertisement

Section 8: TSP command reference
Example
userstring.add("assetnumber", "236")
userstring.add("product", "Widgets")
userstring.add("contact", "John Doe")
for name in userstring.catalog() do
print(name .. " = " ..
userstring.get(name))
end
Also see

userstring.catalog()

userstring.delete()
userstring.get()
userstring.catalog()
This function creates an iterator for the user-defined string catalog.
Type
TSP-Link accessible
Function
No
Usage
for name in userstring.catalog() do body end
name
body
Details
The catalog provides access for user-defined string pairs, allowing you to manipulate all the key-value pairs in
nonvolatile memory. The entries are enumerated in no particular order.
Example 1
for name in userstring.catalog() do
userstring.delete(name)
end
Example 2
for name in userstring.catalog() do
print(name .. " = " ..
userstring.get(name))
end
Also see
userstring.add()
userstring.delete()
userstring.get()
8-250
(on page 8-250)
(on page 8-251)
(on page 8-251)
Affected by
The name of the string; the key of the key-value pair
Code to execute in the body of the for loop
(on page 8-249)
(on page 8-251)
(on page 8-251)
Model 2450 Interactive SourceMeter® Instrument Reference Manual
Stores user-defined strings in nonvolatile
memory and recalls them from the
instrument using a for loop.
Where saved
Deletes all user-defined strings in nonvolatile
memory.
Prints all userstring key-value pairs.
Output:
product = Widgets
assetnumber = 236
contact = John Doe
The above output lists the user-defined strings
added in the example for the userstring.add()
function. Notice the key-value pairs are not listed in
the order they were added.
Default value
2450-901-01 Rev. B/September 2013

Advertisement

Table of Contents
loading

Table of Contents