![background image](http://html2.mh-extra.com/html/keithley/sourcemeter-2600b-series/sourcemeter-2600b-series_reference-manual_4085220750.webp)
Series 2600B System SourceMeter® Instrument Reference Manual
Section 7: TSP command reference
2600BS-901-01 Rev. C / August 2016
7-411
Details
This function associates the string
value
with the string
name
and stores this key-value pair in
nonvolatile memory.
Use the
userstring.get()
function to retrieve the
value
associated with the specified
name
.
You can use the
userstring
functions to store custom, instrument-specific information in the
instrument, such as department number, asset number, or manufacturing plant location.
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
Stores user-defined strings in nonvolatile
memory and recalls them from the
instrument using a for loop.
Also see
(on page 7-411)
(on page 7-412)
(on page 7-413)
userstring.catalog()
This function creates an iterator for the user-defined string catalog.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
for
name
in userstring.catalog() do
body
end
name
The name of the string; the key of the key-value pair
body
Code to execute in the body of the for loop
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
Deletes all user-defined strings in nonvolatile
memory.