Programming Example - Keithley 708B Reference Manual

Switching matrix
Hide thumbs Also See for 708B:
Table of Contents

Advertisement

Section 6: Instrument programming

Programming example

Script with a for loop
The following script puts a message on the front panel display slowly — one character at a time. The
intent of this example is to demonstrate:
the use of a for loop
simple display Instrument Control Library (ICL) commands
simple Lua string manipulation
When creating a script using the TSB Embedded, you do not need the shell commands loadscript
and endscript, as shown in the examples below.
Example: User script
User script created in TSB Embedded
display.clear()
myMessage = "Hello World!"
for k = 1, string.len(myMessage) do
x = string.sub(myMessage, k, k)
display.settext(x)
print(x)
delay(1)
end
6-34
Models 707B and 708B Switching Matrix Reference Manual
NOTE
User script created in user's own program
loadscript
display.clear()
myMessage = "Hello World!"
for k = 1, string.len(myMessage) do
x = string.sub(myMessage, k, k)
display.settext(x)
print(x)
delay(1)
end
endscript
707B-901-01 Rev. A / August 2010

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

707b

Table of Contents