Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Keithley 2612A - How to operate pulse sweep on both channels and get data?

Solved!
Go to solution

I need some clues how to operate pulse sweep on both channels and get data from Keithley 2612A.

One channel sweep is explained in examples of the driver.

How to measure and read data from both channels? Please help.

0 Kudos
Message 1 of 15
(7,219 Views)

Hi Antme2017,

This is tricky to troubleshoot since National Instruments does not support most 3rd party drivers. Do you have a link to where the driver came from? Knowing the code and examples you're referring to makes it much easier to move forward.

NickelsAndDimes
Product Support Engineer - sbRIO
National Instruments
0 Kudos
Message 2 of 15
(7,183 Views)

Thanks.

I've started looking in Keithley forum.

If I find something let you know.

0 Kudos
Message 3 of 15
(7,176 Views)
Solution
Accepted by topic author Antme2017

Hey,

 

In the Labview driver for the 26xx source meter there's a VI that allows the user to run TSB scripts.

 

something like this script that gets data from channels A and B.

 

--[[
	Title:			KE26XXB Pulsed Sweep Dual

	Description:	This example demonstrates how to synchronize pulsed
		sweeps between two SMU channels on a dual channel Series 2600B
		SourceMeter instrument.  This example performs linear sweeps but
		can easily be modified to perform log or list sweeps.  This
		example also programs both SMUs to source the same levels
		however, this can also easily be modified for each SMU to output
		different levels.
		There are two functions contained in this example script.  One
		function outputs pulsed voltage sweeps while the other performs
		pulsed current sweeps.
		At the conclusion of the sweeps the data is returned to the
		instrument console in a format that is compatible for copy and
		paste into Microsoft Excel.

	Equipment Needed:
		1x Dual Channel Series 2600B SourceMeter instrument

	Script Functions:
		PulsedSweepVDual(start, stop, numPoints, pulseWidth, pulsePeriod, limitI, nplc, remoteSense)
		PulsedSweepIDual(start, stop, numPoints, pulseWidth, pulsePeriod, limitV, nplc, remoteSense)
]]

--[[
	Name:	PulsedSweepVDual(start, stop, numPoints, pulseWidth, pulsePeriod, limitI, nplc, remoteSense)
	
	Description:
		This function performs synchronized pulsed linear voltage sweeps
		on dual SMU channels.

	Parameters:
		start:			The voltage level of the first step in the sweep in volts
		stop:			The voltage level of the last step in the sweep in volts
		numPoints:		The number of points in the sweep
		pulseWidth:		The width of the pulse in seconds
		pulsePeriod:	The time from the start of one pulse to the start of the next pulse
		limitI:			The current limit of the pulse in amps
		nplc:			The measurment aperture setting in PLCs where 1 PLC = 1/60 s for 60Hz power
		remoteSense		Set to true to enable 4-Wire (Kelvin) measurements or to false for 2-Wire measurements

	Notes:
		After calling this function you will need to press the TRIG button
		on the instrument's front panel to trigger the sweep to start.
		The code can easily be modified to trigger off other sources as
		well.

	Example Usage:
		PulsedSweepVDual(0, 10, 11, 1e-3, 5e-3, 0.1, 0.001, false)
]]
function PulsedSweepVDual(start, stop, numPoints, pulseWidth, pulsePeriod, limitI, nplc, remoteSense)
	reset()
	-- Configure Channel A Settings
	--=============================
	smua.reset()
	smua.source.func					= smua.OUTPUT_DCVOLTS
	if remoteSense == true then
		smua.sense						= smua.SENSE_REMOTE
	else
		smua.sense						= smua.SENSE_LOCAL
	end
	smua.source.autorangev			= smua.AUTORANGE_OFF
	smua.source.rangev				= math.max(math.abs(start), math.abs(stop))
	smua.source.levelv				= 0
	-- Set the DC bias limit.  This is not the limit used during the pulses.
	smua.source.limiti				= 0.1

	-- Disabling Auto-Ranging and Auto-Zero ensures accurate and consistent timing
	smua.measure.autozero			= smua.AUTOZERO_ONCE
	smua.measure.autorangei			= smua.AUTORANGE_OFF
	smua.measure.rangei				= limitI
	smua.measure.nplc				= nplc
	-- A timer will be used to set the measure delay and synchronize the measurement
	-- between the two SMUs so set the built in delay to 0.
	smua.measure.delay				= 0
	
	-- Prepare the Reading Buffers
	smua.nvbuffer1.clear()
	smua.nvbuffer1.collecttimestamps= 1
	smua.nvbuffer2.clear()
	smua.nvbuffer2.collecttimestamps= 1
	--=============================
	-- End Channel A Settings

	-- Configure Channel B Settings
	--=============================
	smub.reset()
	smub.source.func					= smub.OUTPUT_DCVOLTS
	if remoteSense == true then
		smub.sense						= smub.SENSE_REMOTE
	else
		smub.sense						= smub.SENSE_LOCAL
	end
	smub.source.autorangev			= 0
	smub.source.rangev				= math.max(math.abs(start), math.abs(stop))
	smub.source.levelv				= 0
	-- Set the DC bias limit.  This is not the limit used during the pulses.
	smub.source.limiti				= 0.1

	-- Disabling Auto-Ranging and Auto-Zero ensures accurate and consistent timing
	smub.measure.autozero			= smua.AUTOZERO_ONCE
	smub.measure.autorangei			= 0
	smub.measure.rangei				= limitI
	smub.measure.nplc				= nplc
	-- A timer will be used to set the measure delay and synchronize the measurement
	-- between the two SMUs so set the built in delay to 0.
	smub.measure.delay				= 0

	-- Prepare the Reading Buffers
	smub.nvbuffer1.clear()
	smub.nvbuffer1.collecttimestamps= 1
	smub.nvbuffer2.clear()
	smub.nvbuffer2.collecttimestamps= 1
	--=============================
	-- End Channel B Settings

	-- Configure the Trigger Model
	--============================
	-- Pressing the TRIG button on the front panel will trigger the sweep to start
	display.trigger.clear()

	-- Timer 1 controls the pulse period
	trigger.timer[1].count			= numPoints > 1 and numPoints - 1 or 1
	trigger.timer[1].delay			= pulsePeriod
	trigger.timer[1].passthrough	= true
	trigger.timer[1].stimulus		= display.trigger.EVENT_ID

	-- Timer 2 controls the measurement
	trigger.timer[2].count			= 1
	-- Set the measure delay long enough so that measurements start after the pulse
	-- has settled, but short enough that it fits within the width of the pulse.
	trigger.timer[2].delay			= pulseWidth - (1/localnode.linefreq)*nplc - 60e-6
	trigger.timer[2].passthrough	= false
	trigger.timer[2].stimulus		= trigger.timer[1].EVENT_ID

	-- Timer 3 controls the pulse width
	trigger.timer[3].count			= 1
	trigger.timer[3].delay			= pulseWidth
	trigger.timer[3].passthrough	= false
	trigger.timer[3].stimulus		= trigger.timer[1].EVENT_ID

	-- Configure SMUA Trigger Model for Sweep
	smua.trigger.source.linearv(start, stop, numPoints)
	smua.trigger.source.limiti		= limitI
	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.count				= numPoints
	smua.trigger.arm.stimulus		= 0
	smua.trigger.source.stimulus	= trigger.timer[1].EVENT_ID
	smua.trigger.measure.stimulus	= trigger.timer[2].EVENT_ID
	smua.trigger.endpulse.stimulus	= trigger.timer[3].EVENT_ID
	smua.trigger.source.action		= smua.ENABLE

	-- Configure SMUB Trigger Model for Sweep
	smub.trigger.source.linearv(start, stop, numPoints)
	smub.trigger.source.limiti		= limitI
	smub.trigger.measure.action		= smub.ENABLE
	smub.trigger.measure.iv(smub.nvbuffer1, smub.nvbuffer2)
	smub.trigger.endpulse.action	= smub.SOURCE_IDLE
	smub.trigger.endsweep.action	= smub.SOURCE_IDLE
	smub.trigger.count				= numPoints
	smub.trigger.arm.stimulus		= 0
	smub.trigger.source.stimulus	= trigger.timer[1].EVENT_ID
	smub.trigger.measure.stimulus	= trigger.timer[2].EVENT_ID
	smub.trigger.endpulse.stimulus	= trigger.timer[3].EVENT_ID
	smub.trigger.source.action		= smub.ENABLE
	--==============================
	-- End Trigger Model Configuration

	smua.source.output				= smua.OUTPUT_ON
	smub.source.output				= smub.OUTPUT_ON

	-- Start the trigger model execution
	smua.trigger.initiate()
	smub.trigger.initiate()
	-- Sweep will not start until the TRIG button is pressed

	-- Wait until the sweep has completed
	waitcomplete()
	smua.source.output				= smua.OUTPUT_OFF
	smub.source.output				= smub.OUTPUT_OFF
	
	-- Print the data back to the Console in tabular format
	print("Time\tSMUA Voltage\tSMUA Current\tSMUB Voltage\tSMUB Current")
	for x=1,smua.nvbuffer1.n do
		-- Voltage readings are in nvbuffer2.  Current readings are in nvbuffer1.
		print(smua.nvbuffer1.timestamps[x], smua.nvbuffer2[x], smua.nvbuffer1[x], smub.nvbuffer2[x], smub.nvbuffer1[x])
	end
end

 

script vi.png

 

 

Curt

0 Kudos
Message 4 of 15
(7,152 Views)
Solution
Accepted by topic author Antme2017

Thanks a lot.

There is also useful link:

https://forum.tek.com/viewtopic.php?t=100180

 

0 Kudos
Message 5 of 15
(7,145 Views)

When I try to run this script on a Keithley 2612A an error code states that the 'timer' cannot be set to a nil value. Am I missing anything?

0 Kudos
Message 6 of 15
(6,246 Views)

Hi, it was almost 1 year ago. I have to check. I will try to do it ASAP.

0 Kudos
Message 7 of 15
(6,233 Views)

Could you print the error picture please

0 Kudos
Message 8 of 15
(6,226 Views)

I am using the code titled "KE26XXB Pulsed Sweep Dual" and receiving this error message.ErrorKeithley.PNG

0 Kudos
Message 9 of 15
(6,218 Views)

Could you please send me a link to that code "KE26XXB Pulsed Sweep Dual"?

0 Kudos
Message 10 of 15
(6,214 Views)