![background image](http://html2.mh-extra.com/html/keithley/sourcemeter-2601/sourcemeter-2601_reference-manual_4018913376.webp)
12-116
Return to
2600S-901-01 Rev. C / January 2008
Section 12: Instrument Control Library
Series 2600 System SourceMeter® Instruments Reference Manual
userstring functions
The functions in this group are used to store/retrieve user-defined strings in non-volatile memory.
tsplink.writeport
Function
Writes to all TSP-Link synchronization lines.
Usage
tsplink.writeport(data)
data
Value to write to the port; 0 to 7.
Remarks
• The binary representation of data indicates the output pattern to be written to the I/O port.
For example, a
data
value of 2 has a binary equivalent of 010. Line 2 is set high (1), and
the other 2 lines are set low (0).
• Write protected lines will not be changed (see
).
• The
reset
function does not affect the present states of the digital I/O lines.
• Use the
tsplink.writebit
and
tsplink.writeport
commands to control the
output state of the synchronization line while the trigger mode is set to
tsplink.TRIG_BYPASS
.
Details
See “
.
Also see
,
Example
Sets the synchronization lines 1 and 2 high (binary 011):
tsplink.writeport(3)
tsplink.writeprotect
Attribute
Write protect mask that disables bits from being changed with the
tsplink.writebit
and
tsplink.writeport
functions.
Usage
mask = tsplink.writeprotect
-
- Reads write protect mask.
tsplink.writeprotect
=
mask
-- Writes write protect mask.
mask
--
Set to the value that specifies the bit pattern
for write protect
.
Remarks
• Bits set to 1 cause the corresponding line to be write protected.
• The binary equivalent of
mask
indicates the mask to be set for the I/O port. For example,
a
mask
value of 5 has a binary equivalent 101. This mask write protects lines 1 and 3.
Details
See “
.
Also see
,
Example
Write protects lines 1 and 3:
tsplink.writeprotect
=
5
userstring.add
Function
Adds a user-defined string to non-volatile memory.
Usage
userstring.add(name, value)
name
The name for the string.
value
The string to associate with the name.
Remarks
This function will associate the string
value
with the string
name
and store the pair in
non-volatile memory. The value associated with the given name can be retrieved with
the
userstring.get
function.
Also see
Example
Stores user-defined strings in non-volatile memory:
userstring.add("assetnumber", "236")
userstring.add("department", "Widgets")
userstring.add("contact", "John Doe")