19-60 Return to Section Topics 2600AS-901-01 Rev. B / September 2008
Section 19: Remote Commands Series 2600A System SourceMeter® Instruments Reference Manual
file:seek
Function Sets and retrieves a file’s current position.
TSP-Link
accessibility
This function cannot be accessed from a remote TSP-Link node.
Usage position, errormsg = file:seek()
position, errormsg = file:seek(whence)
position, errormsg = file:seek(whence, offset)
position The new file position, measured in bytes from the
beginning of the file.
errormsg Indicates whether an error was encountered while
processing the function.
file The descriptor of the file.
whence A string indicating the base against which offset is applied.
Default is “cur”.
offset The intended new position, measured in bytes from a base
indicated by whence. Default is 0.
Remarks • The whence parameter may be any of the following:
"set": beginning of file
"cur": current position
"end": end of file
• If an error is encountered, the command returns nil and the error string.
file:write
Function Writes data to a file.
TSP-Link
accessibility
This function cannot be accessed from a remote TSP-Link node.
Usage file:write(data1)
file:write(data1, data2)
file:write(data1, ..., datan)
data1 The data to be written.
data2 The data to be written.
datan The data written to the file. The number of data items
written matches the number of values given.
file The descriptor of the file to be written.
Remarks • An arbitrary number of data values may be passed to this command.
• You must use strings or numbers as parameters.