
Model 2460 Interactive SourceMeter® Instrument User's Manual
Section 8: Measuring I-V characteristics of a solar panel
2460-900-01 Rev. A / September 2014
8-7
Send the following commands for this example application:
--Define the number of points in the sweep.
num = 115
--Reset the Model 2460 and clear the buffer.
reset()
--Set the source and measure functions.
smu.measure.func = smu.FUNC_DC_CURRENT
smu.source.func = smu.FUNC_DC_VOLTAGE
--Configure the measurement settings.
smu.measure.terminals = smu.TERMINALS_FRONT
smu.measure.sense = smu.SENSE_4WIRE
smu.measure.autorange = smu.ON
smu.measure.nplc = 1
--Configure the source settings.
smu.source.highc = smu.OFF
smu.source.range = 20
smu.source.readback = smu.ON
smu.source.highc = smu.OFF
smu.source.ilimit.level = 4
smu.source.sweeplinear("SolarCell", 0, 20, num, 0.05)
--Start the trigger model and wait for it to complete.
trigger.model.initiate()
waitcomplete()
--Define initial values.
voltage = defbuffer1.sourcevalues
current = defbuffer1
isc = current[1]
mincurr = current[1]
imax = current[1]
voc = voltage[1]
vmax = voltage[1]
pmax = voltage[1]*current[1]
--Calculate values.
for i = 1, num do
print(voltage[i],current[i],voltage[i]*current[i])
if (voltage[i]*current[i] < pmax) then
pmax = voltage[i]*current[i]
imax = current[i]
vmax = voltage[i]
end
if math.abs(current[i]) < math.abs(mincurr) then
voc = voltage[i]
end
end
pmax = math.abs(pmax)
imax = math.abs(imax)
print("Pmax=",pmax,",Imax=",imax,",Vmax=",vmax,",Isc=",isc,",Voc=",voc)
--Display values on the Model 2460 front panel.
display.changescreen(display.SCREEN_USER_SWIPE)
display.settext(0, string.format("Pmax = %.4fW", pmax))
display.settext(1, string.format("Isc = %.4fA, Voc = %.2fV", isc, voc))