EasyManuals Logo

Tektronix KEITHLEY 2600B Series User Manual

Tektronix KEITHLEY 2600B Series
834 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 #417 background imageLoading...
Page #417 background image
Section 9: TSP command reference Series 2600B System SourceMeter® instrument Reference Manual
9-96 2600BS-901-01 Rev. F/August 2021
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.read")
myfile, myfile_err, myfile_errnum = io.open(fileName, "w")
myfile:write("Line 1\n")
myfile:flush()
myfile:close()
do
fileHandle = io.input(fileName)
value = io.read("*a")
print(value)
end
fileHandle:close()
print(errorqueue.next())
Writes data to a USB flash drive.
Also see
fileVar:write() (on page 9-99)
io.open() (on page 9-119)
io.write() (on page 9-123)
fileVar:read()
This function reads data from a file.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
data1 = fileVar:read()
data1 = fileVar:read(format1)
data1, data2 = fileVar:read("format1", "format2")
data1, ..., datan = fileVar:read("format1", ..., "formatn")
data1
First data read from the file
data2
Second data read from the file
datan
Last data read from the file
fileVar
The descriptor of the file to be read
format1
A string or number indicating the first type of data to be read
format2
A string or number indicating the second type of data to be read
formatn
A string or number indicating the last type of data to be read
...
One or more entries (or values) separated by commas

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix KEITHLEY 2600B Series and is the answer not in the manual?

Tektronix KEITHLEY 2600B Series Specifications

General IconGeneral
BrandTektronix
ModelKEITHLEY 2600B Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals