Makesetter() - Keithley 2601B Reference Manual

2600b series system sourcemeter instrument
Hide thumbs Also See for 2601B:
Table of Contents

Advertisement

Section 7: TSP command reference
Details
This function is useful for aliasing attributes to improve execution speed. Calling the function created with
makegetter() executes faster than accessing the attribute directly.
Creating a getter function is only useful if it is going to be called several times. Otherwise, the overhead of
creating the getter function outweighs the overhead of accessing the attribute directly.
Example
getlevel = makegetter(smua.source, "levelv")
v = getlevel()
Also see

makesetter()

(on page 7-146)
makesetter()
This function creates a function that, when called, sets the value of an attribute.
Type
TSP-Link accessible
Function
No
Usage
setter = makesetter(table, attributeName)
setter
table
attributeName
Details
This function is useful for aliasing attributes to improve execution speed. Calling the setter function will execute
faster than accessing the attribute directly.
Creating a setter function is only useful if it is going to be called several times. If you are not calling the
setter function several times, it is more efficient to access the attribute directly.
Example
setlevel = makesetter(smua.source, "levelv")
for v = 1, 10 do
setlevel(v)
end
Also see
makegetter()
(on page 7-145)
7-146
Series 2600B System SourceMeter® Instrument Reference Manual
Affected by
Function that sets the value of the attribute
Read-only table where the attribute is located
The string name of the attribute
Creates a getter function called
getlevel.
When getlevel() is called, it
returns the value of
smua.source.levelv.
Where saved
Default value
Creates a setter function called
setlevel.
Using setlevel() in the loop
sets the value of
smua.source.levelv,
performing a source sweep.
2600BS-901-01 Rev. B / May 2013

Advertisement

Table of Contents
loading

This manual is also suitable for:

2604b2614b2634b2635b2636b2602b ... Show all

Table of Contents