EasyManuals Logo
Home>Keithley>Multimeter>3700 Series

Keithley 3700 Series User Manual

Keithley 3700 Series
936 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 #634 background imageLoading...
Page #634 background image
Series 3700A System Switch/Multimeter Reference Manual Section 11: TSP command reference
3700AS-901-01 Rev. D/June 2018 11-255
io.open()
This function opens a file for later reference.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
No
Usage
fileVar, errorMsg = io.open("path")
fileVar, errorMsg = io.open("path", mode)
fileVar
The descriptor of the opened file
errorMsg
Indicates whether an error was encountered while processing the
function
path
The path of the file to open
mode
A string representing the intended access mode ("r" = read,
"w" = write, and "a" = append)
Details
The path to the file to open may be absolute or relative to the current working directory. If you
successfully open the file, errorMsg is nil and fileVar has the descriptor that can be used to
access the file.
If an error is encountered, the command returns nil for fileVar and an error string.
Example
testFile, testError = io.open("testfile.txt", "w")
if testError == nil then
testFile:write("This is my test file")
io.close(testFile)
end
Opens file testfile.txt for
writing. If no errors were found
while opening, writes "This is
my test file" and closes the
file.
Also see
Script examples (on page 9-5)
fileVar:close() (on page 11-242)
io.close() (on page 11-253)
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

Table of Contents

Other manuals for Keithley 3700 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keithley 3700 Series and is the answer not in the manual?

Keithley 3700 Series Specifications

General IconGeneral
BrandKeithley
Model3700 Series
CategoryMultimeter
LanguageEnglish

Related product manuals