
19-18
Return to
2600AS-901-01 Rev. B / September 2008
Section 19: Remote Commands
Series 2600A System SourceMeter® Instruments Reference Manual
File I/O
Lua supports file I/O with its
io
library commands. A subset of these commands is supported for
use with Series 2600A instruments. As with Lua
fs
, these commands are encapsulated as an
io
logical instrument so that the files on any given node are accessible to the entire TSP-Link system.
Lua organizes its file I/O commands into two groups:
1.
Commands that reside in the
io
table, for example:
io.open
,
io.close
,
io.input
,
and
io.output
. These commands are responsible for opening and closing file descriptors
and performing basic I/O operations on a pair of default files, one input and one output.
2.
Commands that reside in the file descriptors themselves (for example:
file:seek
,
file:write
, and
file:read
) operate exclusively on the file with which they are
associated.
NOTE File descriptor commands for file I/O use a colon (:) to separate the
command parts rather than a period (.) like the
io
commands.
Note that file descriptors cannot be passed between nodes in a TSP-Link system; as such, the
io.open
command is not accessible via the TSP-Link. However, the default input and output files
mentioned above allow for the execution of many file I/O operations without any reference to a file
descriptor.
The following Lua I/O commands, which support basic file I/O, are included for your reference:
The following standard I/O commands are not supported at this time:
file:lines
file:setvbuf
io.lines
io.popen
io.tmpfile