![background image](http://html2.mh-extra.com/html/keithley/2657a/2657a_reference-manual_4007750403.webp)
Section 7: TSP command reference
Model 2657A High Power System SourceMeter® Instrument Reference Manual
7-90
2657A-901-01 Rev. B/December 2012
fileVar:seek()
This function sets and gets a file's current position.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
position, errorMsg
=
fileVar
:seek()
position, errorMsg
=
fileVar
:seek(
whence
)
position, errorMsg
=
fileVar
:seek(
whence
,
offset
)
position
The new file position, measured in bytes from the beginning of the file
errorMsg
A string containing the error message
fileVar
The file descriptor variable
whence
A string indicating the base against which
offset
is applied; the default is
"cur"
offset
The intended new position, measured in bytes from a base indicated by
whence
(default is
0
)
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
(on page 7-105)
fileVar:write()
This function writes data to a file.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function No
Usage
fileVar
:write(
data
)
fileVar
:write(
data1
,
data2
)
fileVar
:write(
data1
, ...,
datan
)
fileVar
The file descriptor variable
data
Write all data to the file
data1
The first data to write to the file
data2
The second data to write to the file
datan
The last data to write to the file
...
One or more entries (or values) separated by commas
Содержание 2657A
Страница 3: ......