
Model 2461 Interactive SourceMeter® Instrument Reference Manual
Section 8: TSP command reference
2461-901-01 A/November 2015
8-15
Example
capTest2 = buffer.make(200, buffer.STYLE_COMPACT)
Creates a 200-element compact reading buffer named
capTest2
.
Also see
(on page 8-18)
(on page 8-22)
(on page 8-41)
(on page 8-43)
(on page 3-2)
(on page 3-23)
(on page 3-27)
buffer.save()
This function saves data from the specified reading buffer to a USB flash drive.
Type
TSP-Link accessible
Affected by
Where saved
Default value
Function
Yes
Usage
buffer.save(
bufferVar
,
fileName
)
buffer.save(
bufferVar
,
fileName
,
timeFormat
)
buffer.save(
bufferVar
,
fileName
,
timeFormat, start, end
)
bufferVar
The name of the reading buffer, which may be a default buffer (
defbuffer1
or
defbuffer2
) or a user-defined buffer
fileName
A string that indicates the name of the file on the USB flash drive in which to save
the reading buffer
timeFormat
Defines how date and time information from the buffer is saved in the file on the
USB flash drive; the values are:
•
Save dates, times, and fractional seconds;
buffer.SAVE_FORMAT_TIME
•
Saves relative timestamps;
buffer.SAVE_RELATIVE_TIME
•
Saves seconds and fractional seconds;
buffer.SAVE_RAW_TIME
•
Saves timestamps;
buffer.SAVE_TIMESTAMP_TIME
start
Defines the starting point in the buffer to start saving data
end
Defines the ending point in the buffer to stop saving data
Details
The filename must specify the full path (including
/usb1/
). If included, the file extension must be set
to
.csv
(if no file extension is specified,
.csv
is added).
For options that save more than one item of time information, each item is comma-delimited. For
example, the default format is
date
,
time
, and
fractional seconds
for each reading.
Examples of valid destination file names:
buffer.save(MyBuffer, "/usb1/myData")
buffer.save(MyBuffer, "/usb1/myData.csv")
The Model 2461 does not check for existing files when you save. Verify that you are using a unique
name to avoid overwriting any existing
.csv
files on the flash drive.