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 #446 background imageLoading...
Page #446 background image
Section 11: TSP command reference Model 2601B-PULSE System SourceMeter Instrument Reference Manual
11-88 2601B-PULSE-901-01A April 2020
fileVar:write()
This function writes data to a file.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
fileVar:write(data)
fileVar:write(data1, data2)
fileVar:write(data1, ..., datan)
fileVar
The file descriptor variable
data
Write all data to the file
data1
The first data to write to the file
data2
The second data to write to the file
datan
The last data to write to the file
...
One or more entries (or values) separated by commas
Details
This function may buffer data until a flush (fileVar:flush() or io.flush()) or close
(fileVar:close() or io.close()) operation is performed.
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:write")
myfile, myfile_err, myfile_errnum = io.open(fileName, "w")
do
myfile:write("Line 1")
end
myfile:close()
os.remove(fileName)
Write data to a file.
Also see
fileVar:close() (on page 11-83)
fileVar:flush() (on page 11-84)
io.close() (on page 11-102)
io.flush() (on page 11-103)
io.open() (on page 11-104)

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