I am using LabView 18 and am trying to produce a plot of current versus a staircase voltage sweep. I'm having trouble getting the instrument to stop its increment when I stop running the program. I also don't know how to actually plot current vs voltage it's currently voltage vs time. Any help is appreciated. I've attached a Labview 15 version of the code
Solved! Go to Solution.
How's this? (Untested!) I use Ramp by Pattern to create an array of the voltage values you tell teh instrument to measure at before the loop. Then each loop just add a new measurement to an array. You will want the measurement delay to be longer than it takes to make 1 measurement, probably at least 2x longer to avoid memory reading errors
If you press stop, the loop exits and it sends an Abort to the K6517B.
*.docx - You will get errors/warning when the paths that the Keithley 6517 driver VIs are loaded from differ on your PC and on mine. Those look like warnings that the path changed...just ignore and carry on unless there's an error.
>> error 213 init ignored
Using debugging, can you see when that error is generated? (What VI?)
This code should match yours from before, with only changes to how it stores/plots data in the loop.
Oh, I did change the order of the staircase sweep setup and the test sequence configure setup because it mentioned to do the configure first. Also I changed the inputs to constants. Did you change those constants to match your previous code? (You didn't save default values so it was hard to guess.)
I'm using the K6517B_VISweep_cds.vi
I measured Current and set it to Arm, Staircase sweep, Line 1, and Immediate.
The error occurs at the Read Trace Buffer.vi
I tried the K6517B_VISweep_cds2_LV2015.vi,I changed the constants to Current and set it to Arm, Staircase sweep, and Immediate as well. This one does its reading only after the sweep has ended in debug mode. Normally it just flashes SEQ and doesn't sweep at all. This one seems near what I'm looking for.
I made a few changes to your code, It does work, but seems to be measuring time not voltage against current
Your code is under the name Test 2.
You are not waiting long enough before trying to acquire the first reading in memory. If there's a 1s measurement delay, plus all of the auto-zero, triggering, auto-ranging, etc.. that goes on then an extra 100ms is just not enough. Put a 2-3s delay in before you start reading any measurements from memory, otherwise you are likely to encounter the case where there's nothing there yet.