8: TSP command reference Model 2450 Interactive SourceMeter® Instrument
8-14 2450-901-01 Rev. B/September 2013
buffer.saveappend()
This function appends data from the reading buffer to a file on the USB flash drive.
Type TSP-Link accessible
Affected by Where saved Default value
Usage
buffer.saveappend(bufferVar, filename)
buffer.saveappend(bufferVar, filename, timeFormat)
buffer.saveappend(bufferVar, filename, timeFormat, start, end)
The name of a reading buffer from which you want to append data to the specified
file
The name of the file on the USB flash drive to which the reading buffer will be
appended
Indicates 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
or 1
• Saves relative time stamps: buffer.SAVE_RELATIVE_TIME or 2
• Saves seconds and fractional seconds: buffer.SAVE_RAW_TIME or 4
•
Saves time stamps: buffer.SAVE_TIMESTAMP_TIME or 8
Indicates the starting point within the buffer to save data
Indicates the ending point within the buffer to save data
Details
If the file you specify does not exist on the USB drive, this command creates the file.
For options that save more than one item of time information, each item is comma-delimited. For example, the
default format will be date, time, and fractional seconds for each reading.
The file extension .csv is appended to the filename if necessary. Any file extension other than .csv generates
errors.
The index column entry in the .csv file starts at 1 for each append operation.
Examples of valid destination file names:
buffer.saveappend(bufferVar, "/usb1/myData")
buffer.saveappend(bufferVar, "/usb1/myData.csv")
Invalid destination filename examples:
buffer.saveappend(bufferVar, "/usb1/myData.")
— The period is not followed by csv.
buffer.saveappend(bufferVar, "/usb1/myData.txt")
— The only allowed extension is .csv. If .csv is not assigned, it is automatically added
Example 1
buffer.saveappend(MyBuffer, "/usb1/myData.csv")
Append reading and default time information from a buffer named MyBuffer to a file named myData.csv on
the USB flash drive.