2600S-901-01 Rev. C / January 2008 Return to Section Topics 12-3
Series 2600 System SourceMeter® Instruments Reference Manual Section 12: Instrument Control Library
Functions and attributes
Commands can be function based or attribute based.
Functions
Function based commands are used to control actions or activities. For example, performing a
voltage measurement is a function (action) of a SMU. A function based command is not
necessarily directly related to a Series 2600 operation. For example, the
bit.bitand function will
logically AND two numbers.
Each function consists of a function name followed by a set of parenthesis (()). If the function
does not have a parameter, the parenthesis set is left empty. Examples:
digio.writeport(15) Sets digital I/O lines 1, 2, 3 and 4 high.
digio.writebit(3, 0) Sets line 3 low (0).
smua.reset() Returns SMU A to its default settings.
digio.readport() Reads the digital I/O port.
The results of a function call are used by assigning the return values to variables and accessing
those variables. The following code will measure SMU A voltage and return the reading:
reading = smua.measure.v()
print(reading)
Output: 2.360000e+00
The above output indicates that the voltage reading is 2.36V.
For a function that returns one value, the function call can be used in an expression. For example:
if smua.measure.v() > 5 then
...
end
Attributes
An attribute is a characteristic of an instrument feature or operation. For example, some
characteristics of a SMU source include the source function, range and output level.
Assigning a value to an attribute
An attribute-based command can be used to assign a new value to an attribute. For many
attributes, the value can be in the form of a discrete number or a predefined identifier. For
example, filter type is an attribute. The moving average filter is selected by assigning the attribute
to either of the following values:
0 or smuX.FILTER_MOVING_AVG.
Either of the following command messages will configure SMU A for the moving average filter:
smua.measure.filter.type = 0
smua.measure.filter.type = smua.FILTER_MOVING_AVG
Some attributes can take any numeric value that is within a valid range. For example, the Model
2601/2602 voltage source can be set from -40.4V to +40.4V, while the Model 2611/2612 voltage
source can be set from -202V to +202V. The following command message sets the SMU A source
level to 1.53V:
smua.source.levelv = 1.53