Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

2636A MOSFET forward sweep

Use this forum for questions about Keithley Test Script Builder software.
Post Reply
bpatterson
Posts: 17
Joined: September 25th, 2014, 1:22 pm
Country: United States

2636A MOSFET forward sweep

Post by bpatterson » March 25th, 2015, 3:49 pm

Hello,

I'm looking for a TSP script for the standard MOSFET forward series of curves that are generated from a stepped gate voltage but using the two channels of a 2636A. e.g. measuring the forward curve at Vgs 5V, 10V, 15V, 20V at the same time with the Vgs as smua and Vds as smub. I've found something very similar to this but it uses the 2636A to drive the gate and the 2651A to drive the drain. While this would work, it does the triggering off of the TSP link and I don't know enough about the triggering system to change this. Is there this basic script already out there and I'm missing it or could someone help me with adjusting the triggering for the two channels instead of the different instruments.

Below is the example I found.

Code: Select all

--[[
	Title:			IV Curves Example Script

	Description:	This script will perform a series of IV Curves on a
	MOSFET or IGBT device and will return the data in a Microsoft Excel
	compatible format for graphing and analysis.
	
	TSP-Link Configuration:
	Node 1: 2651A
	Node 2: 26xxA

	Master Node: Node 1
]]

--[[
	IV_Curves(gstart, gstop, gsteps, dstart, dstop, dsteps, pulseWidth, pulsePeriod, pulseLimit)
	
	Description:	This function will perform a series of pulsed sweeps
	on a MOSFET or IGBT device to generate a series of IV Curves that
	characterize the device.  Note: To avoid device	oscillations, a
	series resistor on the gate terminal of the	device may be required.
	
	Parameters:
		gstart:		The starting voltage of the gate sweep
		gstop:		The ending voltage of the gate sweep
		gsteps:		The number of steps in the gate sweep
		dstart:		The starting voltage of the drain sweep
		dstop:		The ending voltage of the drain sweep
		dsteps:		The number of steps in the drain sweep
		pulseWidth:	The width of the drain pulse in seconds
		pulsePeriod:The time in seconds between the start of consecutive drain pulses in the sweep
		pulseLimit:	The current limit in Amps of the drain pulse

	Example Usage:
		IV_Curves(5, 9, 5, 0, 10, 21, 300e-6, 30e-3, 50)
--]]
function IV_Curves(gstart, gstop, gsteps, dstart, dstop, dsteps, pulseWidth, pulsePeriod, pulseLimit)
	reset()
	tsplink.reset()

	-- Configure the Drain SMU(2651A)
	---------------------------------
	smua.reset()
	smua.source.func		= smua.OUTPUT_DCVOLTS
	smua.sense				= smua.SENSE_REMOTE

	smua.source.rangev		= math.max(math.abs(dstart), math.abs(dstop))
	-- Select the source range that is large enough to fit all values of the sweep
	smua.source.levelv		= 0 -- Sets the drain bias level
	smua.source.limiti		= 5

	smua.measure.rangev		= smua.source.rangev
	smua.measure.rangei		= (pulseLimit == "off") and 50 or pulseLimit
	-- Select a measure range large enough to fit pulses up to the current limit

	smua.measure.autozero	= smua.AUTOZERO_ONCE
	smua.measure.nplc		= 0.001
	-- NPLC can be increased to improve measurement accuracy.
	-- However, it should remain small enough to fit the measurement
	-- within the width of the settled part of the pulse.
	smua.measure.delay		= (pulseWidth - ((1/localnode.linefreq) * smua.measure.nplc)) - 50e-6
	-- Set the measure delay so that the measurement is
	-- taken at the end of the pulse before the falling edge

	-- Timer 1 controls the pulse period
	trigger.timer[1].count			= (dsteps <= 1) and 1 or (dsteps - 1)
	-- If dsteps <= 1 then use 1 for the count else use dsteps - 1
	trigger.timer[1].delay			= pulsePeriod
	trigger.timer[1].passthrough	= true
	trigger.timer[1].stimulus		= tsplink.trigger[1].EVENT_ID
	trigger.timer[1].clear()

	-- Timer 2 controls the pulse width
	trigger.timer[2].count			= 1
	trigger.timer[2].delay			= pulseWidth - 3e-6
	trigger.timer[2].passthrough	= false
	trigger.timer[2].stimulus		= smua.trigger.SOURCE_COMPLETE_EVENT_ID
	trigger.timer[2].clear()

	-- Configure Drain SMU(2651A) trigger model
	smua.trigger.source.linearv(dstart, dstop, dsteps)
	smua.trigger.source.limiti		= pulseLimit
	smua.trigger.measure.action		= smua.ENABLE
	smua.trigger.measure.iv(smua.nvbuffer1, smua.nvbuffer2)
	smua.trigger.endpulse.action	= smua.SOURCE_IDLE
	smua.trigger.endsweep.action	= smua.SOURCE_IDLE
	smua.trigger.arm.count			= gsteps
	smua.trigger.count				= dsteps
	smua.trigger.arm.stimulus		= 0
	smua.trigger.source.stimulus	= trigger.timer[1].EVENT_ID
	smua.trigger.measure.stimulus	= 0
	smua.trigger.endpulse.stimulus	= trigger.timer[2].EVENT_ID
	smua.trigger.source.action		= smua.ENABLE

	-- Configure TSP-Link Triggers
	tsplink.trigger[1].clear()
	tsplink.trigger[1].mode			= tsplink.TRIG_SYNCHRONOUSM
	tsplink.trigger[1].stimulus		= smua.trigger.ARMED_EVENT_ID
	-- TSP-Link Trigger 1 is used by the 2651A to command the 26xxA
	-- to step the gate and for the 26xxA to report to the 2651A
	-- that it has completed the step.

	tsplink.trigger[2].clear()
	tsplink.trigger[2].mode			= tsplink.TRIG_FALLING
	tsplink.trigger[2].stimulus		= smua.trigger.SWEEP_COMPLETE_EVENT_ID
	-- TSP-Link Trigger 2 is used by the 2651A to command the 26xxA that
	-- it has completed the drain sweep and that the 26xxA continue.

	-- Prepare the Drain SMU (2651A) reading buffers
	smua.nvbuffer1.clear()
	smua.nvbuffer1.collectsourcevalues	= 1
	smua.nvbuffer2.clear()
	smua.nvbuffer2.collectsourcevalues	= 1


	-- Configure the Gate SMU(26xxA)
	--------------------------------
	node[2].smua.reset()
	node[2].smua.source.func		= node[2].smua.OUTPUT_DCVOLTS
	node[2].smua.sense				= node[2].smua.SENSE_REMOTE
	node[2].smua.source.levelv		= 0
	node[2].smua.source.limiti		= 100e-3
	node[2].smua.measure.delay		= 300e-6	-- Give gate 300us to settle
	-- Do not need to configure any additional measure settings.
	-- Timing is not critical on the gate so autorange will do.

	node[2].smua.source.highc		= 0
	-- If you find the gate to be unstable even with a gate resistor in place
	-- changing highc to 1 can improve stability.

	-- Configure Gate SMU(26xxA) Trigger Model
	node[2].smua.trigger.source.linearv(gstart, gstop, gsteps)
	node[2].smua.trigger.source.limiti		= 100e-3
	node[2].smua.trigger.measure.action		= node[2].smua.ENABLE
	node[2].smua.trigger.measure.iv(node[2].smua.nvbuffer1, node[2].smua.nvbuffer2)
	node[2].smua.trigger.endpulse.action	= smua.SOURCE_HOLD
	node[2].smua.trigger.endsweep.action	= smua.SOURCE_IDLE
	node[2].smua.trigger.count				= gsteps
	node[2].smua.trigger.arm.stimulus		= 0
	node[2].smua.trigger.source.stimulus	= node[2].tsplink.trigger[1].EVENT_ID
	node[2].smua.trigger.measure.stimulus	= 0
	node[2].smua.trigger.endpulse.stimulus	= node[2].tsplink.trigger[2].EVENT_ID
	node[2].smua.trigger.source.action		= smua.ENABLE

	-- Configure Model 26xxA TSP-Link Triggers
	node[2].tsplink.trigger[1].clear()
	node[2].tsplink.trigger[1].mode			= node[2].tsplink.TRIG_SYNCHRONOUSA
	node[2].tsplink.trigger[1].stimulus		= node[2].smua.trigger.MEASURE_COMPLETE_EVENT_ID

	node[2].tsplink.trigger[2].clear()
	node[2].tsplink.trigger[2].mode			= node[2].tsplink.TRIG_FALLING

	-- Prepare the Gate SMU (26xxA) reading buffers
	node[2].smua.nvbuffer1.clear()
	node[2].smua.nvbuffer1.collectsourcevalues	= 1
	node[2].smua.nvbuffer2.clear()
	node[2].smua.nvbuffer2.collectsourcevalues	= 1

	-- The SMUs are configured and ready to run the test

	-- Outputs on
	node[2].smua.source.output		= 1	
	smua.source.output				= 1
	
	-- Start the 26xxA's trigger model
	node[2].smua.trigger.initiate()

	-- Start the 2651A's trigger model
	smua.trigger.initiate()

	waitcomplete()	-- Wait until the sweeps are complete	
	
	-- Outputs off
	smua.source.output				= 0	
	node[2].smua.source.output		= 0

	-- Return the data
	PrintIVcurveData(gsteps, dsteps)
end


--[[
	PrintIVcurveData(gsteps, dsteps)
	
	Description:	This function will output the data collected by
	the IV_Curves() function in a Microsoft Excel compatible format.
	For each step of the gate, this function will output three
	columns containing the drain sweep data as well as the gate data
	in the first row.
	
	Parameters:
		gsteps:	The number of steps in the gate sweep
		dsteps:	The number of steps in the drain sweep

	Example Usage:
		PrintIVcurveData(5, 21)
--]]
function PrintIVcurveData(gsteps, dsteps)
	line1 = ""
	line2 = ""
	for i = 1,gsteps do
		line1 = line1 .. string.format("Vgs = %0.2f\t%g\t%g\t",
							node[2].smua.nvbuffer1.sourcevalues[i],
							node[2].smua.nvbuffer2[i],
							node[2].smua.nvbuffer1[i])
		line2 = line2 .. "Source Value\tVoltage\tCurrent\t"
	end
	print(line1)
	print(line2)
	for i = 1, dsteps do
		line = ""
		for j = 1, gsteps do
			line = line .. string.format("%g\t%g\t%g\t",
							smua.nvbuffer1.sourcevalues[(j - 1) * dsteps + i],
							smua.nvbuffer2[(j - 1) * dsteps + i],
							smua.nvbuffer1[(j - 1) * dsteps + i])
		end
		print(line)
	end
end
Thanks,

brian.d.smith
Keithley Applications
Keithley Applications
Posts: 402
Joined: June 10th, 2013, 6:00 am
Country: United States

Re: 2636A MOSFET forward sweep

Post by brian.d.smith » March 26th, 2015, 6:33 am

Have you tried using the internal web page TSP Express? That is the quickest way to produce a set of forward curves. You can plot the data and save the data from TSP Express.

Using Test Script Builder, you can run the forward curves but you cannot save the data nor plot the curves. Are you planning to use the script as the core of a Labview or MATLAB app?

bpatterson
Posts: 17
Joined: September 25th, 2014, 1:22 pm
Country: United States

Re: 2636A MOSFET forward sweep

Post by bpatterson » March 26th, 2015, 9:37 am

I have not tried the TSP Express internal webpage. Does this allow me access to the code created to generate these curves?

I'm going to operate the 2636A through an external program similar to LabView. Ideally, I would like to save a script on the smu that could just call with some setup parameters and the data would be spit out over the data bus. I already have a way of collecting this data and saving it. I would like to try and avoid any gui interface as I'm trying to make this automated.

Andrea C
Keithley Applications
Keithley Applications
Posts: 1281
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: 2636A MOSFET forward sweep

Post by Andrea C » March 26th, 2015, 4:20 pm

Here is a script that may be useful starting point.

Code: Select all

--[[

For Generation of Family of Curves on a MOSFET: IDVD

When drain smu sweep completes, it signals gate smu to go to next value in it's sweep.
This is typicial scenario for generation of family of curves for a MOSFET:
step the Gate, Sweep the Drain

Example Config:  dual channel instrument such as 2602A or 2612A or 2636A

NOTE:  this example is written for demonstration of code concepts only and is not intended to
       be production quality code.


]]

function _MemoryBuffers(whichSMU)

---clear and initialize nvbuffers
		whichSMU.nvbuffer1.clear() --clear smui nvbuffer1
		whichSMU.nvbuffer2.clear() --clear smui nvbuffer2
		whichSMU.nvbuffer1.appendmode = 1 --enable appending to nvbuffer1
		whichSMU.nvbuffer2.appendmode = 1 --enable appending to nvbuffer2
		whichSMU.nvbuffer1.collectsourcevalues = 1 --enable source values to be collected to nvbuffer1 
		whichSMU.nvbuffer2.collectsourcevalues = 1 --enable source values to be collected to nvbuffer2
		whichSMU.nvbuffer1.collecttimestamps = 1 --enable time stamps to be collected to nvbuffer1		
		whichSMU.nvbuffer2.collecttimestamps = 1 --enable time stamps to be collected to nvbuffer2
end


function _ConfigVSweep(smu, start, stop, nPts, nplc, delay)
              --config(smu, start, stop, stepSize, nplc, delay)
    -- Set up the source
    smu.source.func = smu.OUTPUT_DCVOLTS
    smu.source.autorangev = smu.AUTORANGE_OFF  
    smu.source.rangev = 20   -- range
    smu.source.levelv = 0    -- idle level of voltage when not doing waveform
    smu.source.limiti = 100e-3  -- 2612/2636 has limit of 100ma on 200V range for DC operation
    smu.source.delay = 0

    -- setup the measure
    --smu.measure.rangei = 100e-3               
    smu.measure.autorangei = smu.AUTORANGE_ON  
    smu.measure.lowrangei = 100e-9   
    --smu.measure.rangev = 20
    smu.measure.autorangev = smu.AUTORANGE_ON
    smu.measure.autozero = smu.AUTOZERO_OFF      
    smu.measure.delay = delay          
    smu.measure.nplc = nplc  -- time spent measuring

    smu.trigger.arm.count = 1		-- Default
    smu.trigger.arm.stimulus = 0	-- Default; like SCPI IMMediate

    -- Configure Source Event Detector and Source Action Block 
    smu.trigger.source.stimulus = 0 
    smu.trigger.source.action = smu.ENABLE

    -- **************  program the source values  **********************
    --smu.trigger.source.listv(sample)		
    smu.trigger.source.linearv(start,stop,nPts)		
    smu.trigger.count = nPts	

    -- during the sweep, use same current limit as is used during idle mode
    smu.trigger.source.limiti = smu.LIMIT_AUTO	

    -- Configure Measure Event Detector and Measure Action Block 
    -- hold off measure until sourcing is complete	
    smu.trigger.measure.stimulus = 0
    smu.trigger.measure.action = smu.ENABLE   -- enable/disable measurements		

    -- program what parameters to measure
    smu.trigger.measure.iv(smu.nvbuffer1, smu.nvbuffer2)   -- measure the current and voltage	

    -- Configure End Pulse Event Detector and End Pulse Action Block 	
    smu.trigger.endpulse.stimulus = 0
    smu.trigger.endpulse.action = smu.SOURCE_HOLD
    -- SOURCE_IDLE for pulse or SOURCE_HOLD for waveform

    -- Configure End Sweep Action Block
    -- when sweep is done, set source back to idle level
    -- which is controlled by smu.source.levelv = XX
    smu.trigger.endsweep.action = smu.SOURCE_IDLE

end -- function config

function _ConfigTiming(gate_smu,drain_smu, drain_arm_count)

    -- drain_smu performs a complete sweep for each step of the gate_smu sweep
    
    gate_smu.trigger.arm.count = 1
    drain_smu.trigger.arm.count = drain_arm_count  -- same as number of Vgs steps
    
    -- gate will source next value when drain completes a sweep
    gate_smu.trigger.source.stimulus = drain_smu.trigger.SWEEP_COMPLETE_EVENT_ID
    
    -- drain will arm and carry out new sweep for each source value of gate
    drain_smu.trigger.arm.stimulus = gate_smu.trigger.SOURCE_COMPLETE_EVENT_ID
    
    -- gate smu needs to hold Vgs value while Vds sweeps
    gate_smu.trigger.endsweep.action = gate_smu.SOURCE_HOLD
   
end  -- function config timing


function _PrintData(whichSMU)
   print("Timestamp\tVoltage\tCurrent")
   for i=1, whichSMU.nvbuffer1.n  do
     print(string.format("%g\t%g\t%g", whichSMU.nvbuffer1.timestamps[i],whichSMU.nvbuffer2[i], whichSMU.nvbuffer1[i]))
   end
end


--************************ MAIN Program ********************

reset()
errorqueue.clear()


local startVgs = 2
local stopVgs = 5
local Vgs_steps = 4
local nplc = 1
local gate_meas_delay = 0.001

local startVds = 0
local stopVds = 10
local Vds_steps = 21
local drain_meas_delay = 0

-- define SMU alias
gate=node[1].smua
drain=node[1].smub

_MemoryBuffers(gate)
_MemoryBuffers(drain)

_ConfigVSweep(gate, startVgs, stopVgs, Vgs_steps, nplc, gate_meas_delay)
_ConfigVSweep(drain, startVds, stopVds, Vds_steps, nplc, drain_meas_delay)

_ConfigTiming(gate,drain, Vgs_steps)

gate.source.output = gate.OUTPUT_ON
drain.source.output = drain.OUTPUT_ON


drain.trigger.initiate()
gate.trigger.initiate()

-- to get very first gate value output, we need to by-pass the source stimulus the first time.
-- otherwise it would wait forever
gate.trigger.source.set()

waitcomplete()

-- now that everything done, set gate back to zero volts
gate.source.levelv = 0

gate.source.output = gate.OUTPUT_OFF
drain.source.output = drain.OUTPUT_OFF

print()
_PrintData(drain)
print()
_PrintData(gate)

bpatterson
Posts: 17
Joined: September 25th, 2014, 1:22 pm
Country: United States

Re: 2636A MOSFET forward sweep

Post by bpatterson » April 2nd, 2015, 11:09 am

Hello,

Thank you for the code. I think it will be very useful for another test setup I'm working on. To do the forward MOSFET sweep, I have adapted the code I found for doing the sweep with a 2651A and 2636B.

While this works, I am having one issue with the last gate point. When I do a sweep from 10-20V Vgs with 2V steps, I get good data for everything but the last point (20V). When I look at the front panel when running this test, it looks like the SMU channel for the gate (SMUB) is not applying the voltage. It shows the top value (measurement) as 20.0001V but the scrB value is 0.0000V. This looks like it set the source value to 20V, made a measurement, and then turned off the source before the drain (SMUA) has finished/started its sweep. I believe there is something wrong with the triggering of the channel but I can't see what is wrong since it works for the other gate steps.

Below is code used and output graph.

Code: Select all

--[[
	Title:			IV Curves Example Script

	Description:	This script will perform a series of IV Curves on a
	MOSFET or IGBT device and will return the data in a Microsoft Excel
	compatible format for graphing and analysis.
	
	Instruments:
	26xxA 

]]

--[[
	IV_Curves(gstart, gstop, gsteps, dstart, dstop, dsteps, pulseWidth, pulsePeriod, pulseLimit)
	
	Description:	This function will perform a series of pulsed sweeps
	on a MOSFET or IGBT device to generate a series of IV Curves that
	characterize the device.  Note: To avoid device	oscillations, a
	series resistor on the gate terminal of the	device may be required.
	
	Parameters:
		gstart:		The starting voltage of the gate sweep
		gstop:		The ending voltage of the gate sweep
		gsteps:		The number of steps in the gate sweep
		dstart:		The starting voltage of the drain sweep
		dstop:		The ending voltage of the drain sweep
		dsteps:		The number of steps in the drain sweep
		pulseWidth:	The width of the drain pulse in seconds
		pulsePeriod:The time in seconds between the start of consecutive drain pulses in the sweep
		pulseLimit:	The current limit in Amps of the drain pulse

	Example Usage:
		IV_Curves(10, 20, 6, 0, 5, 30, 0.001, 0.050, 10)
--]]
function IV_Curves(gstart, gstop, gsteps, dstart, dstop, dsteps, pulseWidth, pulsePeriod, pulseLimit)
	reset()

	-- Configure the Drain SMU(26xxA Channel A)
	-- Pulsed current measurment
	---------------------------------
	smua.reset()
	smua.source.func		= smua.OUTPUT_DCVOLTS
	smua.sense				= smua.SENSE_REMOTE

	smua.source.rangev		= math.max(math.abs(dstart), math.abs(dstop))
	-- Select the source range that is large enough to fit all values of the sweep
	smua.source.levelv		= 0 -- Sets the drain bias level
	smua.source.limiti		= 0.1

	smua.measure.rangev		= smua.source.rangev
	smua.measure.rangei		= (pulseLimit == "off") and 10 or pulseLimit	--limited by single channel 2636A
	-- Select a measure range large enough to fit pulses up to the current limit

	smua.measure.autozero	= smua.AUTOZERO_ONCE
	smua.measure.nplc		= 0.020					--nplc adjusted for cable length
	-- NPLC can be increased to improve measurement accuracy.
	-- However, it should remain small enough to fit the measurement
	-- within the width of the settled part of the pulse.
	smua.measure.delay		= (pulseWidth - ((1/localnode.linefreq) * smua.measure.nplc)) - 50e-6
	-- Set the measure delay so that the measurement is
	-- taken at the end of the pulse before the falling edge

	-- Set up timing for pulse measurement
	-- Timer 1 controls the pulse period
	trigger.timer[1].count			= (dsteps <= 1) and 1 or (dsteps - 1)
	-- If dsteps <= 1 then use 1 for the count else use dsteps - 1
	trigger.timer[1].delay			= pulsePeriod
	trigger.timer[1].passthrough	= true	
	trigger.timer[1].stimulus		= smub.trigger.MEASURE_COMPLETE_EVENT_ID --flag on completion of gate voltage measurement
	trigger.timer[1].clear()

	-- Timer 2 controls the pulse width
	trigger.timer[2].count			= 1
	trigger.timer[2].delay			= pulseWidth - 3e-6
	trigger.timer[2].passthrough	= false
	trigger.timer[2].stimulus		= smua.trigger.SOURCE_COMPLETE_EVENT_ID	--flag for finish of drain sweep
	trigger.timer[2].clear()

	-- Configure Drain SMU(26xxA) trigger model
	smua.trigger.source.linearv(dstart, dstop, dsteps)
	smua.trigger.source.limiti		= pulseLimit
	smua.trigger.measure.action		= smua.ENABLE
	smua.trigger.measure.iv(smua.nvbuffer1, smua.nvbuffer2)
	smua.trigger.endpulse.action	= smua.SOURCE_IDLE
	smua.trigger.endsweep.action	= smua.SOURCE_IDLE
	smua.trigger.arm.count			= gsteps
	smua.trigger.count				= dsteps
	smua.trigger.arm.stimulus		= 0
	smua.trigger.source.stimulus	= trigger.timer[1].EVENT_ID
	smua.trigger.measure.stimulus	= 0
	smua.trigger.endpulse.stimulus	= trigger.timer[2].EVENT_ID
	smua.trigger.source.action		= smua.ENABLE

	-- Prepare the Drain SMU (26xxA) reading buffers
	smua.nvbuffer1.clear()
	smua.nvbuffer1.collectsourcevalues	= 1
	smua.nvbuffer2.clear()
	smua.nvbuffer2.collectsourcevalues	= 1


	-- Configure the Gate SMU(26xxA SMUB)
	-- DC measurement
	--------------------------------
	smub.reset()
	smub.source.func		= smub.OUTPUT_DCVOLTS
	smub.sense				= smub.SENSE_REMOTE
	smub.source.levelv		= 0
	smub.source.limiti		= 100e-3
	smub.measure.delay		= 300e-6	-- Give gate 300us to settle
	smub.source.rangev		= math.max(math.abs(gstart), math.abs(gstop))
	smub.measure.rangev		= smub.source.rangev
	smub.measure.nplc		= 1

	smub.source.highc		= 0
	-- If you find the gate to be unstable even with a gate resistor in place
	-- changing highc to 1 can improve stability.

	-- Configure Gate SMU(26xxA) Trigger Model
	smub.trigger.source.linearv(gstart, gstop, gsteps)
	smub.trigger.source.limiti		= 100e-3
	smub.trigger.measure.action		= smub.ENABLE
	smub.trigger.measure.iv(smub.nvbuffer1, smub.nvbuffer2)
	smub.trigger.endpulse.action	= smua.SOURCE_HOLD
	smub.trigger.endsweep.action	= smua.SOURCE_IDLE
	smub.trigger.count				= gsteps
	smub.trigger.arm.stimulus		= 0
	smub.trigger.source.stimulus	= smua.trigger.ARMED_EVENT_ID --Start source when set to armed layer (initiate)
	smub.trigger.measure.stimulus	= 0
	smub.trigger.endpulse.stimulus	= smub.trigger.MEASURE_COMPLETE_EVENT_ID --end gate level when done with drain sweep
	smub.trigger.source.action		= smua.ENABLE

	-- Prepare the Gate SMU (26xxA) reading buffers
	smub.nvbuffer1.clear()
	smub.nvbuffer1.collectsourcevalues	= 1
	smub.nvbuffer2.clear()
	smub.nvbuffer2.collectsourcevalues	= 1

	-- The SMUs are configured and ready to run the test

	-- Outputs on
	smub.source.output		= 1	
	smua.source.output		= 1
	
	-- Start the 26xxA's trigger model
	smub.trigger.initiate()

	-- Start the 2651A's trigger model
	smua.trigger.initiate()

	waitcomplete()	-- Wait until the sweeps are complete	
	
	-- Outputs off
	smua.source.output		= 0	
	smub.source.output		= 0

	-- Return the data
	PrintIVcurveData(gsteps, dsteps)
end


--[[
	PrintIVcurveData(gsteps, dsteps)
	
	Description:	This function will output the data collected by
	the IV_Curves() function in a Microsoft Excel compatible format.
	For each step of the gate, this function will output three
	columns containing the drain sweep data as well as the gate data
	in the first row.
	
	Parameters:
		gsteps:	The number of steps in the gate sweep
		dsteps:	The number of steps in the drain sweep

	Example Usage:
		PrintIVcurveData(5, 21)
--]]
function PrintIVcurveData(gsteps, dsteps)
	line1 = ""
	line2 = ""
	for i = 1,gsteps do
		line1 = line1 .. string.format("Vgs = %0.2f\t%g\t%g\t",
							smub.nvbuffer1.sourcevalues[i],
							smub.nvbuffer2[i],
							smub.nvbuffer1[i])
		line2 = line2 .. "Source Value\tVoltage\tCurrent\t"
	end
	print(line1)
	print(line2)
	for i = 1, dsteps do
		line = ""
		for j = 1, gsteps do
			line = line .. string.format("%g\t%g\t%g\t",
							smua.nvbuffer1.sourcevalues[(j - 1) * dsteps + i],
							smua.nvbuffer2[(j - 1) * dsteps + i],
							smua.nvbuffer1[(j - 1) * dsteps + i])
		end
		print(line)
	end
end
Image

Any help would be greatly appreciated. I'm sure it is something simple but I'm just not seeing it.




Thanks,

brian.d.smith
Keithley Applications
Keithley Applications
Posts: 402
Joined: June 10th, 2013, 6:00 am
Country: United States

Re: 2636A MOSFET forward sweep

Post by brian.d.smith » April 2nd, 2015, 4:08 pm

Chances are there is nothing wrong with the code. The current limit (compliance) is probably being reached and the instrument is following your instructions to not go beyond the limits you set. If you can, please post the limits that you are setting and post the data that is being returned.

Andrea C
Keithley Applications
Keithley Applications
Posts: 1281
Joined: October 15th, 2010, 10:35 am
Country: United States
Contact:

Re: 2636A MOSFET forward sweep

Post by Andrea C » April 2nd, 2015, 4:41 pm

Try this:
Change this line:
smub.trigger.endpulse.stimulus = smub.trigger.MEASURE_COMPLETE_EVENT_ID
to be:
smub.trigger.endpulse.stimulus = smua.trigger.SWEEP_COMPLETE_EVENT_ID

The reason it is working for all but the last gate value is that the endpluse.action is SOURCE_HOLD, so the gate value is maintained.
But for the last value in the gate sweep, as soon as the measurement is performed, the gate trigger model moves forward to the endsweep.action which is SOURCE_IDLE.

bpatterson
Posts: 17
Joined: September 25th, 2014, 1:22 pm
Country: United States

Re: 2636A MOSFET forward sweep

Post by bpatterson » April 2nd, 2015, 5:00 pm

Hi,

The limits I set are gstart=10, gstop=20, gsteps=11, dstart=0, dstop=5, dsteps=30, pulseWidth=0.001, pulsePeriod=0.050, pulseLimit=10. I believe the code should be setting the current limit to pulselimit value or 10 if not. And i think the voltage limit on the gate should be set based on the inputs. I guess at 20V, it would set it to the 20V limit. Would i need to set this to more than 20V for this work?

Not sure the best way to display the data so I put it in a dropbox link.

https://www.dropbox.com/s/07ok2sc1kdenn ... 1.xls?dl=0

Thanks

brian.d.smith
Keithley Applications
Keithley Applications
Posts: 402
Joined: June 10th, 2013, 6:00 am
Country: United States

Re: 2636A MOSFET forward sweep

Post by brian.d.smith » April 2nd, 2015, 5:34 pm

Thanks for providing your data. That helps very much. Look at the column of current. You hit 10 amps very early in the sweep. 10 amps is the pulse current limit of the 2636B. Once you hit this limit, the rest of the sweep is not good data. In general, I like to look for the last gate voltage that does not trip the current compliance and use that as final gate voltage for the gate steps. If you must use higher gate voltage steps, then reduce your final drain sweep voltage until you no longer hit the drain current limit.

Below is the V-I limit graph from the 2636B specification.
VI_2636B.jpg
VI_2636B.jpg (195.8 KiB) Viewed 25512 times

Post Reply

Return to “Test Script Builder”

Who is online

Users browsing this forum: No registered users and 2 guests