Loop Control - Keithley 3700 series Reference Manual

System switch/multimeter
Hide thumbs Also See for 3700 series:
Table of Contents

Advertisement

Section 2: TSP Programming Fundamentals
x = 1
y = 2
if (x and y) then
print("' if ' expression 2 was not
false.")
end
if (x or y) then
print("' if ' expression 3 was not false.")
end
if (not x) then
print("' if ' expression 4 was not
false.")
else
print("' if ' expression 4 was
false.")
end
if x == 10 then
print("x = 10")
elseif y > 2 then
print("y > 2")
else
print("x is not equal to 10,
and y is not less than 2.")
end
Output of code above:
Zero is true!
' if ' expression 2 was not false.
' if ' expression 3 was not false.
' if ' expression 4 was false.
x is not equal to 10, and y is not less than 2.

Loop control

TSL has familiar constructs for doing things repetitively and/or until an expression evaluates to
false.
The following code contains an example iteration:
list = {"One", "Two", "Three", "Four", "Five", "Six"}
2-30
Series 3700 System Switch/Multimeter Reference Manual
This is if expression 2.
This is if expression 3.
This is if expression 4.
This is if expression 5.
Document Number: 3700S-901-01 Rev. A / August 2007

Advertisement

Table of Contents
loading

Table of Contents