
2600AS-901-01 Rev. B / September 2008
Return to
19-67
Series 2600A System SourceMeter® Instruments Reference Manual
Section 19: Remote Commands
io.output
Function
Assigns a previously opened file, or opens a new file, as the default output file.
TSP-Link
accessibility
This function can be accessed from a remote TSP-Link node.
Usage
file = io.output(newfile)
file = io.output()
newfile
A file descriptor to assign (or the path of a file to
open) as the default output 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.output(newfile)
is used, the path
indicates the new file.
Remarks
•
When accessed from a remote node using the TSP-Link network, this command does not accept
a file descriptor parameter.
io.read
Function
Reads data from the default input file.
TSP-Link
accessibility
This function can be accessed from a remote TSP-Link node.
Usage
data1 = io.read()
data1 = io.read(format1)
data1, data2 = io.read(format1, format2)
data1, ..., datan = io.read(format1, ..., formatn)
data1
The data read from the file.
data2
The data read from the file.
datan
The data read from the file. The number of return values
matches the number of format values given.
format1
A string or number indicating the type of data to be read.
format2
A string or number indicating the type of data to be read.
formatn
A string or number indicating the type of data to be read.
Remarks
•
The format parameters may be any of the following:
"
*n
": Returns a number.
"
*a
": Returns the whole file, starting at the current position; return an empty string if it is at the
end of file.
"
*l
": Returns the next line, skipping the end of line; return
nil
if the current file position is at
the end of file.
n
:
Returns a string with up to
n
characters; return an empty string if
n
is zero; return
nil
if
the current file position is at the end of file.
• Any number of format parameters may be passed to this command, each corresponding to a
returned data value.
• If no format parameters are provided, the function will perform as if the function was passed the
value “
*1
”.