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.

Pulse function multiple measurements per period

Models 2601, 2602, 2611, 2612, 2635, 2636
Models 2601A, 2602A, 2611A, 2612A, 2635A, 2636A
Models 2601B, 2602B, 2604B, 2611B, 2612B, 2614B, 2634B, 2635B, 2636B
Post Reply
Posts: 2
Joined: April 30th, 2021, 10:48 am
Country: Brazil

Pulse function multiple measurements per period

Post by pedrovfr » April 30th, 2021, 11:17 am

Hello all,

I am trying to modify the TSP function PulseVMeasureI for the 2636A so I measure multiple points during each pulse period.
I've attempted to set a timer to trigger 10 times during the period and set the stimulus for the measurement, but I find measuring only once.
My guess is that there isn't a method count for the smuX.trigger.measureY, wheareas there is a smuX.measure.count.
Is there a way to force the trigger measure to perform several actions or to create a second parallel trigger model so I can arm it many times while the first is focused in the pulses generation?

Code: Select all

-- PulseVMeasureI

function PulseVMeasureIMOD(smu, bias, level, ton, toff, points, meas_per_period)
    -- Default to smua if no smu is specified.
    if smu == nil then
        smu = smua

    -- Save settings in temporary variables so they can be restored at the end.
    local l_s_levelv = smu.source.levelv 
    local l_s_rangev = smu.source.rangev
    local l_s_autorangev = smu.source.autorangev 
    local l_s_func = smu.source.func
    local l_m_autozero = smu.measure.autozero
    local l_m_filter = smua.measure.filter.enable
    local l_d_screen = display.screen

    -- Temporary variables used by this function.
    local l_j, l_tonwm

    -- Clear the front panel display then prompt for input parameters if missing.
    if bias == nil then
        bias = display.prompt(l_volts_fmt, " Volts", "Enter BIAS Voltage.", 0, -l_max_volts, l_max_volts)
        if bias == nil then
            -- Abort if Exit key pressed
    if level == nil then
        level = display.prompt(l_volts_fmt, " Volts", "Enter PULSE Voltage.", 1, -l_max_volts, l_max_volts)
        if level == nil then
            -- Abort if Exit key pressed
    if ton == nil then
        ton = display.prompt("00.000E+00", " Seconds", "Enter pulse ON time.", 20E-3, 0, 20)    
        if ton == nil then
            -- Abort if Exit key pressed
    if toff == nil then
        toff = display.prompt("00.000E+00", " Seconds", "Enter pulse OFF time.", 20E-3, 0, 20)
        if toff == nil then
            -- Abort if Exit key pressed
    if points == nil then
        points = display.prompt("0000", " Pulses", "Enter number of pulses", 10, 1, 1000)   
        if points == nil then
            -- Abort if Exit key pressed

	if meas_per_period == nil then
		meas_per_period = 10

    -- Update display with test info.
    display.settext("PulseV_mod")  -- Line 1 (20 characters max)
    -- Configure source and measure settings.
    smu.source.output = smu.OUTPUT_OFF
    if math.abs(level) > math.abs(bias) then
        smu.source.rangev = level
        smu.source.rangev = bias
    smu.source.levelv = bias
    smu.source.func = smu.OUTPUT_DCVOLTS
    smu.measure.autozero = smu.AUTOZERO_OFF
    smu.measure.filter.enable = smu.FILTER_OFF
    l_tonwm = ton - (smu.measure.nplc/localnode.linefreq) - 250E-6
    -- Setup a buffer to store the result(s) in and start testing.
    smu.nvbuffer1.appendmode = 1
    smu.nvbuffer1.collecttimestamps = 1
    smu.nvbuffer1.collectsourcevalues = 1

    -- Configure triggering.
    smu.trigger.arm.stimulus = 0
    trigger.timer[1].reset()	-- 
    trigger.timer[1].delay = l_tonwm/10
    trigger.timer[1].count = 10
    trigger.timer[1].stimulus = smu.trigger.SOURCE_COMPLETE_EVENT_ID 
    smu.trigger.measure.stimulus = trigger.timer[1].EVENT_ID 
    trigger.timer[2].delay = ton
    trigger.timer[2].count = 1
    trigger.timer[2].stimulus = smu.trigger.SOURCE_COMPLETE_EVENT_ID 
    smu.trigger.endpulse.stimulus = trigger.timer[2].EVENT_ID	
    trigger.timer[3].delay = toff
    trigger.timer[3].count = 1 -- uma parte desligada por periodo
    trigger.timer[3].stimulus = smu.trigger.PULSE_COMPLETE_EVENT_ID
    smu.trigger.source.stimulus = trigger.timer[3].EVENT_ID 

    smu.trigger.source.linearv(level, level, 1) 
    smu.trigger.source.action = smu.ENABLE 
    smu.trigger.measure.action = smu.ENABLE 
    smu.trigger.endpulse.action = smu.SOURCE_IDLE
    smu.trigger.arm.count = 1 --[[During a sweep, the SMU iterates through the arm layer of the trigger model this many times. After performing
this many iterations, the SMU 0returns to an idle state.]]
    smu.trigger.count = points --[[During a sweep, the SMU iterates through the trigger layer of the trigger model this many times. After performing
this many iterations, the SMU returns to the arm layer.]]

    -- Initiate the pulses
    smu.source.output = smu.OUTPUT_ON
    smu.trigger.initiate()--[[This function causes the SMU to clear the four trigger model event detectors and enter its trigger model state
machine (moves the SMU from the idle state into the arm layer).]]
    smu.trigger.source.set()--Seta o detector de estimulos da source como detectado, utilizada no primeiro pulso para nao esperar o timer 3
    delay(toff) -- nao sei pq deste delay
    smu.source.output = smu.OUTPUT_OFF  
    -- Update the front panel display and restore modified settings.
    display.settext("Test complete.")  -- Line 2 (32 characters max)
    smu.source.levelv = 0
    smu.source.rangev = l_s_rangev
    smu.source.autorangev = l_s_autorangev
    smu.source.func = l_s_func
    smu.source.levelv = l_s_levelv
    smu.measure.autozero = l_m_autozero
    smu.measure.filter.enable = l_m_filter
    display.screen = l_d_screen
Please find my modifications on lines 93-94.

(6.08 KiB) Downloaded 1 time

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

Re: Pulse function multiple measurements per period

Post by Andrea C » May 9th, 2021, 10:04 am

Use of the ASYNC trigger model will most likely be your best approach here.

Post Reply

Return to “2600 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 32 guests