Model 2651A High Power System SourceMeter® Instrument Reference Manual
Section 6: Instrument programming
2651A-901-01 Rev. A / March 2011
6-21
Example: User script
User script created in Test Script Builder
User script created in user's own program
function myDisplay(name)
display.clear()
display.settext(
name .. "$N is here!")
end
loadscript
function myDisplay(name)
display.clear()
display.settext(
name .. " $N is here!")
end
endscript
Operators
Lua variables and constants can be compared and manipulated using operators.
Arithmetic operators
Operator Description
+
addition
-
subtraction
*
multiplication
/
division
-
negation (for example, c = -a)
^
exponentiation
Relational operators
Operator Description
<
less than
>
greater than
<=
less than or equal
>=
greater than or equal
~=
not equal
==
equal