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.

2636B generate current single pulse

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
wq1134404729
Posts: 5
Joined: February 27th, 2017, 10:13 pm
Country: Algeria

2636B generate current single pulse

Post by wq1134404729 » February 27th, 2017, 10:26 pm

Progamming by TSB,why happen this error?
Attachments
error.png
error.png (30.49 KiB) Viewed 18066 times

jaime_g
Posts: 93
Joined: September 23rd, 2014, 6:14 am
Country: United States

Re: 2636B generate current single pulse

Post by jaime_g » February 28th, 2017, 3:23 pm

I noticed the number of points in the PulseSweepISingle is set to 11. For a single pulse this should be set to 1.

Here is a script I use for a single 1ms, 10mA pulse using channel B:

Code: Select all

reset()
display.screen = display.SMUB
display.smub.digits = display.DIGITS_4_5
smub.sense = smub.SENSE_REMOTE
smub.measure.nplc = 0.001
smub.source.autorangei = smub.AUTORANGE_OFF
smub.source.rangei = 1e-3
smub.source.leveli = 0
smub.source.limitv = 10
smub.measure.rangev = 10

--Configure trigger to take a measurement in the middle of the pulse
trigger.timer[1].delay = 500e-6
trigger.timer[1].stimulus = smub.trigger.ARMED_EVENT_ID
trigger.timer[1].count = 1
trigger.timer[1].passthrough = false

--Configure trigger to turn off the pulse after 1 ms
trigger.timer[2].delay = 1e-3
trigger.timer[2].stimulus = smub.trigger.ARMED_EVENT_ID
trigger.timer[2].count = 1
trigger.timer[2].passthrough = false

--Arm trigger for single iteration
smub.trigger.arm.count = 1

--Configure source
smub.trigger.source.stimulus = smub.trigger.SWEEPING_EVENT_ID
smub.trigger.source.action = smub.ENABLE
smub.trigger.source.listi({1e-3})
smub.trigger.source.limitv = 10

--Configure measurement
smub.trigger.measure.stimulus = trigger.timer[1].EVENT_ID
smub.trigger.measure.action = smub.ENABLE
smub.trigger.measure.v(smub.nvbuffer1)

--Configure pulse turn off
smub.trigger.endpulse.stimulus = trigger.timer[2].EVENT_ID
smub.trigger.endpulse.action = smub.SOURCE_IDLE

smub.source.output = smub.OUTPUT_ON
smub.trigger.initiate()
waitcomplete()
print(smub.measure.v(smub.nvbuffer1))
smub.source.output = smub.OUTPUT_OFF
Hope this helps.

Jaime Arevalo

wq1134404729
Posts: 5
Joined: February 27th, 2017, 10:13 pm
Country: Algeria

Re: 2636B generate current single pulse

Post by wq1134404729 » March 2nd, 2017, 5:50 pm

jaime_g wrote:I noticed the number of points in the PulseSweepISingle is set to 11. For a single pulse this should be set to 1.

Here is a script I use for a single 1ms, 10mA pulse using channel B:

Code: Select all

reset()
display.screen = display.SMUB
display.smub.digits = display.DIGITS_4_5
smub.sense = smub.SENSE_REMOTE
smub.measure.nplc = 0.001
smub.source.autorangei = smub.AUTORANGE_OFF
smub.source.rangei = 1e-3
smub.source.leveli = 0
smub.source.limitv = 10
smub.measure.rangev = 10

--Configure trigger to take a measurement in the middle of the pulse
trigger.timer[1].delay = 500e-6
trigger.timer[1].stimulus = smub.trigger.ARMED_EVENT_ID
trigger.timer[1].count = 1
trigger.timer[1].passthrough = false

--Configure trigger to turn off the pulse after 1 ms
trigger.timer[2].delay = 1e-3
trigger.timer[2].stimulus = smub.trigger.ARMED_EVENT_ID
trigger.timer[2].count = 1
trigger.timer[2].passthrough = false

--Arm trigger for single iteration
smub.trigger.arm.count = 1

--Configure source
smub.trigger.source.stimulus = smub.trigger.SWEEPING_EVENT_ID
smub.trigger.source.action = smub.ENABLE
smub.trigger.source.listi({1e-3})
smub.trigger.source.limitv = 10

--Configure measurement
smub.trigger.measure.stimulus = trigger.timer[1].EVENT_ID
smub.trigger.measure.action = smub.ENABLE
smub.trigger.measure.v(smub.nvbuffer1)

--Configure pulse turn off
smub.trigger.endpulse.stimulus = trigger.timer[2].EVENT_ID
smub.trigger.endpulse.action = smub.SOURCE_IDLE

smub.source.output = smub.OUTPUT_ON
smub.trigger.initiate()
waitcomplete()
print(smub.measure.v(smub.nvbuffer1))
smub.source.output = smub.OUTPUT_OFF
Hope this helps.

Jaime Arevalo
Thank you! Using your code,I noticed that this program occurs new error.
Attachments
error.png
error.png (18.2 KiB) Viewed 18036 times

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

Re: 2636B generate current single pulse

Post by Andrea C » March 2nd, 2017, 7:52 pm

Which exact model number do you have?
From the TSP> prompt, please send *idn? and post response.

jaime_g
Posts: 93
Joined: September 23rd, 2014, 6:14 am
Country: United States

Re: 2636B generate current single pulse

Post by jaime_g » March 3rd, 2017, 10:55 am

I reviewed the code and found some errors with the measurement timer configuration. :(

Here is an improved version:

Code: Select all

reset()
display.screen = display.SMUA
display.smua.digits = display.DIGITS_4_5
display.smua.measure.func = display.MEASURE_DCVOLTS
smua.sense = smua.SENSE_REMOTE
smua.source.func = smua.OUTPUT_DCAMPS
smua.source.autorangei = smua.AUTORANGE_OFF
smua.source.rangei = 10e-3
smua.source.leveli = 0
smua.source.limitv = 10
smua.measure.nplc = 0.01
smua.measure.autorangev = smua.AUTORANGE_OFF
smua.measure.rangev = 20
smua.measure.autozero = smua.AUTOZERO_ONCE
smua.measure.count = 1
smua.nvbuffer1.clear()

--Configure trigger count
smua.trigger.arm.count = 1
smua.trigger.count = 1
smua.trigger.arm.stimulus = 0

--Configure pulse width timer
trigger.timer[1].delay = 1e-3
trigger.timer[1].count = 1
trigger.timer[1].passthrough = false
trigger.timer[1].stimulus = smua.trigger.ARMED_EVENT_ID

--Configure measurement timer
trigger.timer[2].delay = 500e-6
trigger.timer[2].count = 1
trigger.timer[2].passthrough = false
trigger.timer[2].stimulus = smua.trigger.SOURCE_COMPLETE_EVENT_ID

--Configure source action
smua.trigger.source.listi({10e-3})
smua.trigger.source.limitv = 20
smua.trigger.source.action = smua.ENABLE
smua.trigger.source.stimulus = 0

--Configure measurement action
smua.trigger.measure.stimulus = trigger.timer[2].EVENT_ID
smua.trigger.measure.action = smua.ENABLE
smua.trigger.measure.v(smua.nvbuffer1)

--Configure end of pulse action
smua.trigger.endpulse.stimulus = trigger.timer[1].EVENT_ID
smua.trigger.endpulse.action = smua.SOURCE_IDLE

smua.source.output = smua.OUTPUT_ON
smua.trigger.initiate()
waitcomplete()
printbuffer(1,1,smua.nvbuffer1)
smua.source.output = smua.OUTPUT_OFF
Hope this one works better for you.

Jaime Arevalo

Post Reply

Return to “2600 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 7 guests