Io.flush() - Keithley 2601B Reference Manual

2600b series system sourcemeter instrument
Hide thumbs Also See for 2601B:
Table of Contents

Advertisement

Series 2600B System SourceMeter® Instrument Reference Manual
Usage
io.close()
io.close(file)
file
Details
If a file is not specified, the default output file closes.
Only io.close(), used without specifying a parameter, can be accessed from a remote node.
Example
testFile, testError = io.open("testfile.txt", "w")
if nil == testError then
testFile:write("This is my test file")
io.close(testFile)
end
Also see
io.open()

io.flush()

This function saves buffered data to a file.
Type
TSP-Link accessible
Function
Yes
Usage
io.flush()
Details
You must use the io.flush() or io.close() functions to write data to the file system.
Data is not automatically written to a file when you use the io.write() function. The io.write()
function buffers data; it may not be written to the USB drive immediately. Use the io.flush()
function to immediately write buffered data to the drive.
This function only flushes the default output file.
Using this command removes the need to close a file after writing to it and allows it to be left open to write more
data. Data may be lost if the file is not closed or flushed before an application ends. To prevent the loss of data if
there is going to be a time delay before more data is written (and when you want to keep the file open and not
close it), flush the file after writing to it.
Also see
fileVar:flush()
fileVar:write()
io.write()
2600BS-901-01 Rev. B / May 2013
The descriptor of the file to close
(on page 7-108)
Affected by
(on page 7-89)
(on page 7-91)
(on page 7-111)
Section 7: TSP command reference
Opens file testfile.txt
for writing. If no errors were
found while opening, writes
"This is my test
file" and closes the file.
Where saved
Default value
7-107

Advertisement

Table of Contents
loading

This manual is also suitable for:

2604b2614b2634b2635b2636b2602b ... Show all

Table of Contents