Section 9: TSP command reference Series 2600B System SourceMeter® instrument Reference Manual
9-164 2600BS-901-01 Rev. F/August 2021
makesetter()
This function creates a function that, when called, sets the value of an attribute.
Usage
setter = makesetter(table, "attributeName")
Function that sets the value of the attribute
Read-only table where the attribute is located
The string name of the attribute
Details
This function is useful for aliasing attributes to improve execution speed. Calling the setter function
execute more quickly 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
Creates a setter function called setlevel.
Using setlevel() in the loop sets the value of smua.source.levelv, performing a source sweep.
Also see
makegetter() (on page 9-163)
meminfo()
This function returns the present amount of available memory and the total amount of memory in the instrument.
Usage
freeMem, totalMem = meminfo()
The amount of free dynamically allocated memory available
The total amount of dynamically allocated memory in the instrument