Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

Modifying Keithley 2600 Driver Example Code

Go to solution

Hello all,


I have been attempting to use the example code provided in the Keithley 2600 series driver to develop an IV curve and monitor change in resistance with respect to time. The "KE26XX Config Source & Measure" example VI allows for single measurements of voltage, current, IV, and resistance values per each run sequence. I would like to modify this code to:

  1. Continuously measure the selected value of interest until the program is halted or have a time frame to run and record (the continuous run button does not achieve this)
  2. Take the current output, which is in string form, and put it into a numeric array where the 'x' value is the input and the 'y' value is the output 
  3. Take the array information to develop plots 

I have tried using the string conversion functions for inputs into an array and then deciding the array into 'x' and 'y' sets in order to plot but it has been unsuccessful. I have attached the file in question to this post and I'd greatly appreciate any help.


Best regards,



0 Kudos
Message 1 of 14
Accepted by Freddie6532!

You only need to put a while loop around the measure VI and add some timing and plotting.  Something like...k2600_sampling.png



Not that for real world measurements you would do a much more rigorous setup of the instrument parameters (ranging, zeroing, delays, NPLC, etc..).  Also for fast sampling you would want to investigate the trigger model.  This won't be very fast, but might be a useful start.



Message 2 of 14



Thank you for your help! I was attempting to loop the entire thing.


Best regards,



0 Kudos
Message 3 of 14



Sorry to bother you again. I have been trying to generate an IV curve and in order to do so, the Voltage applied needs to increase at a set increment with respect to time and the correlating current can then be plotted. I tried using the difference in time within the while loop, divide by user defined time increment, and multiply by an increment function to increase the voltage value level with respect to each passing time interval; however, that is causing exponential increase in the voltage value. Could you possibly provide some advice on how to remedy this issue?





0 Kudos
Message 4 of 14

Hi FM,


Not sure I understand exactly.  You'll need to clarify a bit.


You want to do what you were asking before (collect I vs time) but after so X time increase the applied voltage?  You can use 2 arrays, one of times intervals at which to increase the voltage and the other for the voltage at that step.  If the step time is constant than you only need one array. In this case you can build all kinds of random V vs time patterns.  


Now if you just want to do and I-V sweep with a constant dwell time between voltage steps in the sweep there are built in methods you can use.


Clarify a bit and I can advice.  


0 Kudos
Message 5 of 14

Hi Craig,


Thank you for the quick response. Yes, I meant to say that I am trying to do an I-V sweep with a constant dwell time between voltage steps. Where could I find the built in methods that you mentioned.


Best regards,



0 Kudos
Message 6 of 14

There's a very detailed example of using timers and delays in the driver examples, but here's a very simple solution.





Message 7 of 14

Thank you Craig, you're a lifesaver!

0 Kudos
Message 8 of 14

Hey Craig,


So I have been taking measurements with the IV Sweep VI and I've been running into problems with the sweep ending too early and sometimes ending erratically with the last measurement way off from the rest. These are the configurations I have set it to:

  1. 2 wire sense type
  2. Sweep start = 0 Amp
  3. Sweep end = .1 Amp
  4. Number of steps = 100
  5. Compliance = 10 V
  6. NPLC = 10
  7. Measurement delay = 10 ms

Do you think there might be something wrong with my configurations?






0 Kudos
Message 9 of 14

Hmm, I think you need to set the instrument timeout to something longer. You do that using a VISA property node like..




I'd use something ridiculously long like 30 000 (30s) to test.  If that doesn't help, then there's another issue.



0 Kudos
Message 10 of 14