
19-66
Return to
2600AS-901-01 Rev. B / September 2008
Section 19: Remote Commands
Series 2600A System SourceMeter® Instruments Reference Manual
io.flush
Function
Saves buffered data to a file.
TSP-Link
accessibility
This function can be accessed from a remote TSP-Link node.
Usage
io.flush()
Remarks
•
It is important to note that you must use the
or
io.close()
commands to write data
to the file system.
•
Note: Data is not automatically written to a file when you use the
io.write
function.
• The
function will buffer data and it may not be written to the USB drive immediately
while
io:flush
forces any buffered data to be written to the drive.
• This function only flushes the default output file.
Also see
io.input
Function
Assigns a previously opened file, or opens a new file, as the default input file.
TSP-Link
accessibility
This function can be accessed from a remote TSP-Link node.
Usage
file = io.input(newfile)
file = io.input()
newfile
A file descriptor to assign (or the path of a file to
open) as the default input file. The path may be
absolute or relative to the current working directory.
file
The absolute path to the current default input file. If
file = io.input(newfile)
is used, the path indicates
the new file.
Remarks
•
When using this function from a remote TSP-Link node, this command does not accept a file
descriptor.
io.open
Function
Opens a file for later access.
TSP-Link
accessibility
This function cannot be accessed from a remote TSP-Link node.
Usage
file, errormsg = io.open(path)
file, errormsg = io.open(path, mode)
file
The descriptor of the opened file.
path
The path to the file to open. This path may be
absolute or relative to the current working directory.
mode
A string representing the intended access mode;
“
r
” indicates read mode, “
w
” indicates write mode, and “
a
”
indicates append mode. Default is
“
r
”.
errormsg
Indicates whether an error was encountered while
processing the function.
Remarks
• If an error is encountered, the command returns
nil
and the error string.