EasyManuals Logo

Tektronix Keithley 2601B-PULSE Reference Manual

Tektronix Keithley 2601B-PULSE
849 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 #444 background imageLoading...
Page #444 background image
Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-86 2601B-PULSE-901-01A April 2020
Example
local fileName = "/usb1/myfile.txt"
if fs.is_file(fileName) then
os.remove(fileName)
print("Removing file")
else
print("Nothing removed")
end
print("fileVar:read")
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")
contents = myfile:read("*a")
print(contents)
end
myfile:close()
os.remove(fileName)
Reads data from the input file.
Also see
fileVar:write() (on page 11-88)
io.input() (on page 11-104)
io.open() (on page 11-104)
fileVar:seek()
This function sets and gets the present position of a file.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
position, errorMsg = fileVar:seek()
position, errorMsg = fileVar:seek("whence")
position, errorMsg = fileVar:seek("whence", offset)
position
The new file position, measured in bytes from the beginning of the file
errorMsg
A string containing the error message
fileVar
The file descriptor variable
whence
A string indicating the base against which offset is applied; the default is "cur"
offset
The intended new position, measured in bytes from a base indicated by whence
(default is 0)

Table of Contents

Other manuals for Tektronix Keithley 2601B-PULSE

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix Keithley 2601B-PULSE and is the answer not in the manual?

Tektronix Keithley 2601B-PULSE Specifications

General IconGeneral
BrandTektronix
ModelKeithley 2601B-PULSE
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals