Keithley 2601B Reference Manual page 297

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

Advertisement

Section 6: Instrument programming
The syntax of a conditional block is as follows:
if expression then
block
elseif expression then
block
else
block
end
Where:
expression is Lua code that evaluates to either true or false
block consists of one or more Lua statements
Example: If
if 0 then
print("Zero is true!")
else
print("Zero is false.")
end
Example: Comparison
x = 1
y = 2
if x and y then
print("Both x and y are true")
end
Example: If and else
x = 2
if not x then
print("This is from the if block")
else
print("This is from the else block")
end
6-20
Series 2600B System SourceMeter® Instrument Reference Manual
Output:
Zero is true!
Output:
Both x and y are true
Output:
This is from the else
block
2600BS-901-01 Rev. B / May 2013

Advertisement

Table of Contents
loading

This manual is also suitable for:

2604b2614b2634b2635b2636b2602b ... Show all

Table of Contents