EasyManuals Logo

Tektronix Keithley SourceMeter 2470 Reference Manual

Tektronix Keithley SourceMeter 2470
995 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #717 background imageLoading...
Page #717 background image
2470
High Voltage SourceMeter Instrument Reference Manual Section 14:
TSP command reference
2470-901-01 Rev. A / May 2019 14-77
file.flush()
This function writes buffering data to a file on the USB flash drive.
Type TSP-Link accessible
Affected by Where saved Default value
Function
No
Usage
file.flush(fileNumber)
fileNumber
The file number returned from the
file.open()
function to flush
Details
The file.write() function may be buffering data instead of writing immediately to the USB flash
dr
ive. Use file.flush() to flush this data. Data may be lost if the file is not closed or flush
ed
before a script ends.
If there is going to be a time delay before more data is written to a file, flush the file to prevent loss of
data because of an aborted test.
Example
reset()
-- Fix the range to 10 V
smu.measure.range = 10
-- Set the measurement count to 100
smu.measure.count = 100
-- Set up reading buffers
-- Ensure the default measurement buffer size matches the count
defbuffer1.capacity = 100
smu.measure.read()
testDir = "TestData5"
-- create a directory on the USB drive for the data
file.mkdir(testDir)
fileName = "/usb1/" .. testDir .. "/myTestData.csv"
buffer.save(defbuffer1, fileName)
if file.usbdriveexists() != 0 then
--testDir = "TestData3"
-- Create a directory on the USB drive for the data
--file.mkdir(testDir)
-- Open the file where the data will be stored
--fileName = "/usb1/" .. testDir .. "/myTestData.csv"
fileNumber = file.open(fileName, file.MODE_APPEND)
-- Write header separator to file
file.write(fileNumber,
"\n\n====================================================================\n")
-- Write the string data to a file

Table of Contents

Other manuals for Tektronix Keithley SourceMeter 2470

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Tektronix Keithley SourceMeter 2470 and is the answer not in the manual?

Tektronix Keithley SourceMeter 2470 Specifications

General IconGeneral
BrandTektronix
ModelKeithley SourceMeter 2470
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals