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 #420 background imageLoading...
Page #420 background image
Series 2600B System SourceMeter® instrument Reference Manual Section 9: TSP command reference
2600BS-901-01 Rev. F/August 2021 9-99
Also see
io.open() (on page 9-119)
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.

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