Section 7: Command reference Model 2651A High Power System SourceMeter® Instrument Reference Manual
7-372 2651A-901-01 Rev. A / March 2011
userstring.add()
This function adds a user-defined string to nonvolatile memory.
Type TSP-Link accessible
Affected by Where saved Default value
Function Yes
Usage
userstring.add(name, value)
name
The name of the string; the key of the key-value pair
value
The string to associate with name; the value of the key-value pair
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.
Example
userstring.add("assetnumber", "236")
userstring.add("product", "Widgets")
userstring.add("contact", "John Doe")
Stores user-defined strings in nonvolatile
memory.
Also see
userstring.catalog() (on page 7-372)
userstring.delete()
(on page 7-373)
userstring.get()
(on page 7-374)
userstring.catalog()
This function creates an iterator for the user 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 userstring pairs, allowing you to manipulate all the key-value pairs in nonvolatile
memory. The entries are enumerated in no particular order.