Section 7: TSP command reference Model 2657A High Power System SourceMeter® Instrument Reference Manual
7-106 2657A-901-01 Rev. B/December 2012
io.output()
This function assigns a previously opened file or opens a new file as the default output file.
Type TSP-Link accessible Affected by Where saved Default value
Function Yes (see Details)
Usage
fileVar = io.output()
fileVar = io.output(newfile)
fileVar
The descriptor of the output file or an error message (if the function fails)
newfile
A file descriptor to assign (or the path of a file to open) as the default output
file
Details
The path of the file to open may be absolute or relative to the current working directory.
When accessed from a remote node using the TSP-Link network, this command does not accept a file descriptor
parameter and does not return a value.
If the function fails, an error message is returned.
Also see
io.input() (on page 7-104)
io.open()
(on page 7-105)
io.read()
This function reads data from the default input file.
Type TSP-Link accessible Affected by Where saved Default value
Function Yes
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
...
One or more entries (or values) separated by commas