Section 15: TSP command reference
Details
The path of the file to open may be absolute or relative to the current working directory.
When accessed from a remote node using the TSP-Link network, this command does not accept a
file descriptor parameter and does not return a value.
If the function fails, an error message is returned.
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*** io.output")
myfile, myfile_err, myfile_errnum = io.open(fileName, "w")
myfile:write("Line 1")
myfile:close()
do
fileHandle = io.output(fileName)
print(fileHandle)
end
io.close(fileHandle)
print(fileHandle)
os.remove(fileName)
Assign the file to be the default output file.
Also see
io.input()
(on page 15-118)
io.open()
(on page 15-119)
15-120
Model 2606B System SourceMeter® Instrument Reference Manual
2606B-901-01 Rev. C November 2021
Need help?
Do you have a question about the KEITHLEY SourceMeter 2606B and is the answer not in the manual?