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.

Fast IV sweeps - example code and request for help/suggestions

Models 2400, 2401, 2410, 2420, 2425, 2430, 2440, 6430
Post Reply
AllenH
Posts: 2
Joined: May 13th, 2017, 10:31 pm
Country: United States

Fast IV sweeps - example code and request for help/suggestions

Post by AllenH » May 15th, 2017, 3:53 pm

Hi Keithley users and support. I sent this off in reply to a previous support e-mail. But, I need some fast help- I need to get to the bottom of my IV woes, code up some quick python and get to measuring here... I have 10 days to get a ton of work done (and this is just proof that the work is valid, not the actual work- ugh!!)

First, here's some code that Keithley sent to me, commented by myself (are my comments correct?), python code is mine, but Keithley code is sent from Keithley:

Code: Select all

import visa
rm = visa.ResourceManager()
rm.list_resources()
keithley = rm.open_resource('GPIB0::12::INSTR')
# print(keithley.query('*IDN?'))

keithley.write("*rst; status:preset; *cls")

# internal_in_ms = 500
# number_of_readings = 10

# keithley.write("")

# Reset
keithley.write("*RST")
# select voltage source
keithley.write(":SOUR:FUNC:MODE VOLT")
# sweep points 1,0,-1
keithley.write(":SOUR:LIST:VOLT 1,0,-1")
# set ARM count n=1
keithley.write(":ARM:COUNT 1")
# # of sweep points (100)
keithley.write("TRIG:COUN 100")
# 0ms Trigger delay
keithley.write(":TRIG:DEL 0.0")
# 0ms Source delay
keithley.write(":SOUR:DEL 0.0")
# select 1V range
keithley.write(":SOUR:VOLT:RANGE 1")
# set current complaince to 1x10^-3 (1mA)
keithley.write(":SENSE:CURR:PROT 1e-3")
# turn off concurrent functions
keithley.write(":SENSE:FUNC:CONC OFF")
# ??? current sense function
keithley.write(":SENSE:FUNC 'CURR'")
# ???? current range for function - how is this different?
keithley.write(":SENSE:CURR:RANGE 1e-3")
# Measure speed 0.01 PLC (??)
keithley.write(":SENSE:CURR:NPLC 0.01")
# Disable filter
keithley.write(":SENSE:AVERAGE:STAT OFF")
# Disable display circuitry
keithley.write(":DISP:ENAB OFF")
# Disable auto-zero state
keithley.write(":SYSTEM:AZERO:STAT OFF")
# ??? clear trace buffer?
keithley.write(":TRAC:CLE")
# store 100 readings in buffer
keithley.write(":TRAC:POINTS 100")
# ???? store raw readings in buffer what is the 1??
keithley.write(":TRAC:FEED SENSE1")
# list volts sweep mode
keithley.write(":SOUR:VOLT:MODE LIST")
# enable buffer for trace?
keithley.write(":TRAC:FEED:CONT NEXT")
# turn on output
keithley.write(":OUTPUT ON")
# trigger readings
keithley.write(":INIT")

# 
# Now wait until the sweeps complete. Then send
# keithley.write(":TRACE:DATA?")
# Now read the data.
# You will see the timestamps show about 1msec per point.
# This is the fastest voltage sweep the Model 2400 can do.
The first question is worrying me the most:

":sour:volt:mode list" - does this mean only the points in the list get measured?
":sour:list:volt 1,0,-1" would be the list?
I need a sweep from say -40 to +40, possibly 100 or 1000 points in as quick a time as possible to get an average data from an RF plasma (13.56MHz).

Another few questions:
"Trac:feed sense1" - what is the 1 for? I see sense in the manual, but not sense1

and is this sensing the reading range and are they separate from the source range?:
":sense:curr:range 1e-3" (i.e., is this the line I need to make sure I change for higher amperage readings... we get up to about 0.1A in some readings at positive 40volts, but when voltage is negative, the current is quite low, so I suspect I'll end up splitting my readings into two calls to the sourcemeter. I'll likely have to paste together 3 or more sweeps to make my data since the ranges change quite a bit (one nice thing about autorange- but it slows down the measurements quite a bit).

It'd be great to have about 100-1000 data points taken within 1 second if possible.

If I set a delay before doing :trace:data? how long should it be? a few seconds?

Finally, my output looks as follows (within python):
keithley.query_ascii_values("trace:data?")
[1.0, 5.820766e-09, 9.91e+37, 0.0, 21508.0, 0.0, -2.615852e-07, 9.91e+37, 0.0009765625, 21508.0, -1.0, -1.001172e-07, 9.91e+37, 0.001953125, 21508.0, 1.0, -3.57395e-07, 9.91e+37, 0.00390625, 21508.0, 0.0, -2.11061e-07, 9.91e+37, 0.00390625, 21508.0, -1.0, -7.986091e-08, 9.91e+37, 0.005859375, 21508.0, 1.0, -3.372552e-07, 9.91e+37, 0.006835938, 21508.0, 0.0, -2.868474e-07, 9.91e+37, 0.006835938, 21508.0, -1.0, -1.303852e-07, 9.91e+37, 0.008789063, 21508.0, 1.0, -4.280591e-07, 9.91e+37, 0.009765625, 21508.0]

I'm having trouble figuring out the output columns here in the above. - all data is just concatonated with "," delimeters, but one must be the voltage, one the current, and is one a time-stamp?

I really appreciate your thoughts and help!!
-Allen

ps- I must apologize for being new to Keithely data calls via GPIB and python coding!

Post Reply

Return to “2400 Series SourceMeter”

Who is online

Users browsing this forum: No registered users and 6 guests