EasyManuals Logo
Home>Keithley>Multimeter>3720-ST

Keithley 3720-ST User Manual

Keithley 3720-ST
936 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #279 background imageLoading...
Page #279 background image
Section 9: Introduction to TSP operation Series 3700A System Switch/Multimeter Reference Manual
9-6 3700AS-901-01 Rev. D/June 2018
loadscript file_io_test
-- Get the current date and time.
date_time = os.date("%c", os.time())
-- Open the three files for writing.
myfile1, myfile1_err, myfile1_errnum = io.open("/usb1/myfile_io1", "w")
myfile2, myfile2_err, myfile2_errnum = io.open("/usb1/myfile_io2", "w")
myfile3, myfile3_err, myfile3_errnum = io.open("/usb1/myfile_io3", "w")
if (io.type(myfile1) == "file") then
if (io.type(myfile2) == "file") then
if (io.type(myfile3) == "file") then
-- Make myfile1 the default output file.
io.output(myfile1)
-- Write some data to the default file.
io.write("Using io write to myfile1 to io output\n")
io.write(date_time)
io.write("\n")
-- Write to myfile2 using descriptor rather than io write command.
myfile2:write(" file handle to write to myfile2\n")
myfile2:write(" while myfile1 is output file for io\n")
-- Make myfile2 the default output file.
io.output(myfile2)
-- Write some data to the default file.
io.write("Using io write to myfile2 to io output\n")
io.write(date_time)
io.write("\n")
-- Write to myfile3 using descriptor rather than io write command.
myfile3:write(" file handle to write to myfile3\n")
myfile3:write(" while myfile2 is output file for io\n")
-- Make myfile3 the default output file.
io.output(myfile3)
-- Write some data to the default file.
io.write("Using io write to myfile3 to io output\n")
io.write(date_time)
io.write("\n")
-- Write to myfile1 using descriptor rather than io write command.
myfile1:write(" file handle to write to myfile1\n")
myfile1:write(" while myfile3 is output file for io\n")
-- Use the io close rather than file descriptor close command.
io.close(myfile1)
io.close(myfile2)
io.close(myfile3)
else
print("myfile3 did not open for write")
print("error string is " .. myfile3_err)
print("error number is " .. myfile3_errnum)
end
else
print("myfile2 did not open for write")
print("error string is " .. myfile2_err)
print("error number is " .. myfile2_errnum)
end

Table of Contents

Other manuals for Keithley 3720-ST

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 3720-ST and is the answer not in the manual?

Keithley 3720-ST Specifications

General IconGeneral
BrandKeithley
Model3720-ST
CategoryMultimeter
LanguageEnglish

Related product manuals