Tektronix Keithley 2651A Reference Manual page 454

High power system sourcemeter instrument
Table of Contents

Advertisement

Model 2651A High Power System SourceMeter® Instrument Reference Manual
Details
The whence parameters may be any of the following:
"set": Beginning of file
"cur": Current position
"end": End of file
If an error is encountered, it is logged to the error queue, and the command returns nil and the
error string.
Example
local fileName = "/usb1/myfile.txt"
if fs.is_file(fileName) then
os.remove(fileName)
print("Removing file")
else
print("Nothing removed")
end
errorqueue.clear()
print("\n*** fileVar:seek")
myfile, myfile_err, myfile_errnum = io.open(fileName, "w")
myfile:write("Line 1")
myfile:close()
do
myfile, myfile_err, myfile_errnum = io.open(fileName, "r")
position = myfile:seek("end", -1)
print(position)
end
myfile:close()
os.remove(fileName)
Get the present position of a file.
Also see
io.open()
(on page 7-132)
2651A-901-01 Rev. C October 2021
Section 7: TSP command reference
7-109

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Keithley 2651A and is the answer not in the manual?

Questions and answers

Table of Contents