Makegetter(); Makesetter() - Keithley 2651A Reference Manual

High power system sourcemeter instrument
Hide thumbs Also See for 2651A:
Table of Contents

Advertisement

Section 7: Command reference

makegetter()

This function creates a function to get the value of an attribute.
Type
TSP-Link accessible
Function
No
Usage
getter = makegetter(table, attributeName)
getter
table
attributeName
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()

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
7-140
Model 2651A High Power System SourceMeter® Instrument Reference Manual
Affected by
The return value
Read-only table where the attribute is located
A string representing the name of the attribute
(on page 7-140)
Affected by
Function that sets the value of the attribute
Read-only table where the attribute is located
The string name of the attribute
Where saved
Default value
Creates a getter function called
getlevel.
When getlevel() is called, it
returns the value of
smua.source.levelv.
Where saved
Default value
2651A-901-01 Rev. A / March 2011

Advertisement

Table of Contents
loading

Table of Contents