Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Downloading buffers from Keithley 2636A

Hello! 

Has anyone here ever written a program for Keithley 2636A (the sourcemeter/SMU)? 
I am sampling resistance of a device using the Keithley, (I need a higher sampling rate than what LabView and GPIB communication allow). Once the instrument buffer has the data I want, I want to download the buffer data to my computer. 

 

For that, I need a very simple LabView project that reads the full buffer of the Keithley instrument, and saves the array to my computer. 

 

This is the program I start with, but for some reason it does not work. 

lodhi33_0-1614994251701.png

 

Anyone ever worked with a Keithley driver project who might have an idea of what's going on here? 
Thanks a lot, 

Isha 

0 Kudos
Message 1 of 8
(1,611 Views)

And this is the error I get if I execute this code: 

The buffer I am trying to download is actually full, and has an array of ~75 samples (timestamped). I know it is not empty because I take the readings (in SMUA buffer 1) right before running the labview code. 

lodhi33_0-1615075019325.png

 

Any guidance with what I could possibly be doing wrong here is much appreciated! (LabView newbie here.)

Download All
0 Kudos
Message 2 of 8
(1,554 Views)

Hi

The buffer is cleared in the initialize vi. You need to have at least connect a false to the reset input of that vi.

greetings from the Netherlands
0 Kudos
Message 3 of 8
(1,542 Views)

Hi Albert, 

 

Thank you so much for the response! 

I connect a false to the reset VI in the initialize VI as follows: 

lodhi33_0-1615254188617.png

 

I connect a false to the reset loop, and then toggle the loop to false as well. 
However, that messes up something in the initialization and then, I get a timeout error when I run the program with this edited initialization function. 

If I leave the loop as true (instead of the false marked in the image), I get the same buffer empty error. So I really need to put a false to the loop input as well as the loop toggle head. 

lodhi33_1-1615254491019.png

 

It seems to me that the best way to download a data trace from the Keithley 2636A, using the the high sampling rate of the Keithley is:

 

1. Edit and make my own custom initialization VI for the instrument that does not clear the buffer. That means, editing the initialization VI further in a way that does not create issues with timeout (I am not sure how I'd do that). 

Or, 

2. In my program, I should do a trigger for sampling data after the initialization VI. And then I should download whatever data is collected from the trigger to a file: (initialize instrument with parameters -> trigger to run collect and save a fixed number of samples -> when buffer is full/data points collected -> download buffer data to excel file). 
However, I do not see any VI to trigger a sampling event, in this instrument driver library.  

The third option is running the sampling through LabView, where a loop runs in execution to get samples from the instrument (this will limit my data sampling rate to 100 KHz, right?)

Let me know which option you think is best, I will try to create my own custom initialize VI for now. 
Thank you once again. 


0 Kudos
Message 4 of 8
(1,523 Views)

Hi

Creating your own initialization vi is not needed because the initialization vi already has a boolean input that controls the reset function.

 

Your solution number 2 is the normal way, do the initialization before you trigger the data collection.

 

And please don't send pictures of vi's. Send vi's or send snippets so that we see the code instead of a jpg.

greetings from the Netherlands
0 Kudos
Message 5 of 8
(1,515 Views)

Thank you very much Albert! 
I will keep that in mind for the future. 

 

What I still do not see is how can I trigger for multiple samples for this particular instrument (Keithley 2636). I do not see the VI option for triggering it to get a series of samples (and saving the samples in Keithley buffer). (There is a VI for a single trigger. It takes one measurement.)

 

What I am trying to do is this:

 

  • initialize the Keithley with current, voltage and sampling rate (> 100 kHz)
  • setting the Keithley to take and store 1500 samples in its own buffer at the sample rate initialized
  • then trigger that measurement (single trigger to initialize the tool to sample 1500 samples to its own buffer)
  • then, download data from the Keithley buffer to excel file on computer. 

 

I am trying to avoid triggering for each measurement and storing readings in a time controlled loop.

 

That way I will be limited by the LabView/GPIB sampling rate of 100 kHz. Also, I am not comfortable yet using while or for loops and timers in LabView. So if I can set the instrument for a series of readings in its own buffer and then simply use the download trace VI, that would be the ideal solution for me, efficient too. 

Can I use the trigger VI given in the Keithley instrument driver to trigger series of measurements instead of getting a single reading out? 

Thank you once again Albert. I appreciate the guidance. 

0 Kudos
Message 6 of 8
(1,472 Views)

Hi

I don't have a 2636 to test but as far as I know there are vi's available that with one trigger can store a defined number of measurements at a defined speed.

If the vi does not exist, you should be able to create a testscript with Keitleys testpoint. That script can be downloaded allthough it is not a easy tot develop in LabVIEW but easier in testpoint.

For downloading and starting the script are examples available.

Also the 26 series from Keithley can execute a script and communicate at the same time. So you don't have to wait with reading until all data is available.

Maybe the best option is to call Keithley (Tektronix) and work this out together.

greetings from the Netherlands
0 Kudos
Message 7 of 8
(1,463 Views)

Thanks again Albert! A lot. I really appreciate it. 

 

So, one of the issues was definitely the VI I was using to get buffer data to the excel file on my computer. Instead of "Read Buffer", using "Print Buffer" gives you the option to read the instrument buffer for multiple data indexes. The "Read Buffer" only reads data from the buffer at a specified or default index. 


This is my code now. The logical flow is: 


  • Initialize SMU for source parameters and for output read parameters 
  • Configure buffer(/s) for data 
  • Configure a trigger event 
  • Trigger the instrument (this should trigger a long measurement for 100 measurements) 
  • Wait for 5 minutes (60 s x 5) for the measurement to be completed
  • Save range of data from buffer to an excel file on the computer 

I believe what is left now, is for the trigger event (configuration VI for the trigger or the trigger VI itself) to specify the number of samples I want the instrument to measure. (i.e. Number of measurement events I wish to run.) 

In the kinds of trigger events I see (came across) for 2636A, I do not see an input for the VI to specify number of samples... am I missing something? I also have not been able to find VIs to set the NPLC.

I am attaching VI of my preliminary code following the above logic flow. I do realize that I may need to switch the order and configure the buffers before I trigger the instrument. 

And below are snippets of the code, start to end is top to bottom: 


lodhi33_0-1615943846932.png

 

lodhi33_1-1615943889438.png

Either the configure trigger VI or the trigger event should have an option to specify number of samples..(if I am not wrong).  

 

lodhi33_3-1615944173127.png

 

0 Kudos
Message 8 of 8
(1,454 Views)