Filevar:seek(); Filevar:write() - 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

fileVar:seek()

This function sets and gets a file's current position.
Type
TSP-Link accessible
Function
No
Usage
position, errorMsg = fileVar:seek()
position, errorMsg = fileVar:seek(whence)
position, errorMsg = fileVar:seek(whence, offset)
position
errorMsg
fileVar
whence
offset
Details
The whence parameters may be any of the following:
"set": Beginning of file
"cur": Current position
"end": End of file
If an error is encountered, it is logged to the error queue, and the command returns nil and the error string.
Also see
io.open()

fileVar:write()

This function writes data to a file.
Type
TSP-Link accessible
Function
No
Usage
fileVar:write(data)
fileVar:write(data1, data2)
fileVar:write(data1, ..., datan)
fileVar
data
data1
data2
datan
...
2600BS-901-01 Rev. B / May 2013
Affected by
The new file position, measured in bytes from the beginning of the file
A string containing the error message
The file descriptor variable
A string indicating the base against which offset is applied; the default is
"cur"
The intended new position, measured in bytes from a base indicated by
whence (default is 0)
(on page 7-108)
Affected by
The file descriptor variable
Write all data to the file
The first data to write to the file
The second data to write to the file
The last data to write to the file
One or more entries (or values) separated by commas
Section 7: TSP command reference
Where saved
Default value
Where saved
Default value
7-91

Advertisement

Table of Contents
loading

This manual is also suitable for:

2604b2614b2634b2635b2636b2602b ... Show all

Table of Contents