03-05-2021 07:32 PM
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.
Anyone ever worked with a Keithley driver project who might have an idea of what's going on here?
Thanks a lot,
Isha
03-06-2021 05:59 PM
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.
Any guidance with what I could possibly be doing wrong here is much appreciated! (LabView newbie here.)
03-07-2021 03:07 AM
03-08-2021 07:57 PM
Hi Albert,
Thank you so much for the response!
I connect a false to the reset VI in the initialize VI as follows:
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.
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.
03-09-2021 01:33 AM
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.
03-16-2021 12:59 PM
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:
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.
03-16-2021 02:57 PM
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.
03-16-2021 08:23 PM
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:
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:
Either the configure trigger VI or the trigger event should have an option to specify number of samples..(if I am not wrong).