EasyManua.ls Logo

Tektronix Keithley SourceMeter 2450 - Page 89

Tektronix Keithley SourceMeter 2450
108 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
Loading...
Model 2450
SourceMeter® Instrument User's Manual Section 8:
Rechargeable battery measurements
2450-900-01 Rev. E / August 2019 8-11
-- Change the display to the USER swipe screen.
display.changescreen(display.SCREEN_USER_SWIPE)
-- Keep making readings in the while loop until the measured voltage
-- is equal to the voltage limit.
while true do
-- Make a reading and get the current, voltage, and relative timestamp.
curr = smu.measure.read(defbuffer1)
volt = defbuffer1.sourcevalues[iteration]
time = defbuffer1.relativetimestamps[iteration]
hours = time/3600
-- Compare the measured voltage to the voltage limit.
-- Exit the loop if it has reached the limit.
if volt <= voltLimit then
break
end
-- Print the number of completed cycles, the voltage, and the time for the
-- iteration. Display the information on the front panel.
print("Completed Cycles: ", iteration, "Voltage: ", volt, "Time: ", time)
display.settext(display.TEXT1, string.format("Voltage = %.4fV", volt))
display.settext(display.TEXT2, string.format("Current = %.2fA, Time = %.2fHrs",
curr, hours))
-- Increment the number of iterations and wait 10 seconds.
iteration = iteration + 1
delay(10)
end
-- Turn the output off when the voltage limit is reached.
smu.source.output = smu.OFF
-- Save the measurements to the USB flash drive.
FileNumber = file.open("/usb1/TestData.csv", file.MODE_WRITE)
file.write(FileNumber,"Current,Voltage,Seconds\n")
-- Print the measured values in a four-column format.
print("\nIteration:\tCurrent:\tVoltage:\tTime:\n")
for i = 1, defbuffer1.n do
print(i, defbuffer1[i], defbuffer1.sourcevalues[i],
defbuffer1.relativetimestamps[i])
file.write(FileNumber, string.format("%g,%g, %g\r\n",defbuffer1.readings[i],
defbuffer1.sourcevalues[i],defbuffer1.relativetimestamps[i]))
end
-- Close the .csv file.
file.close(FileNumber)

Table of Contents

Related product manuals