From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ramp pattern used in voltage sweep

Hi there!

Currently using Labview 2012 sp1 and i'm using two pieces of equipment, a Keithley 2401 source meter and a luminance meter.

 

I want to do a voltage sweep from say 0-10V every 0.5V, then read out the current as well as the brightness detected from the luminance meter. I tried using keithley 24xx sweep and aquire measurements.vi, and putting it in a while loop and then using a flat sequence structure, hoping that each time during the sweep say from 0V to 0.5V, the current would be read, then the brightness, and then so on until the sweep was finished but the loop is incorrectly used I think. I can get the data for the voltage and current fine, but only the first value at 0V for the brightness is present.

 

I've been reading previous posts about using the Ramp Pattern.vi (shown below), so that I can set the voltage values by: start, end and samples. I'm unsure how you use it though, like do I have to connect it to the Keithley some how? Also I want to connect this to the iterations in a For loop so when its finished the sweep it ends the loop, how do I do this also? 

 

Many thanks in advance!

Will

0 Kudos
Message 1 of 5
(2,656 Views)

Hi Will,

 


do a voltage sweep from say 0-10V every 0.5V


 

Well, you could rephrase it as "I want to output several voltage values, one after the other"…

 


Also I want to connect this to the iterations in a For loop so when its finished the sweep it ends the loop, how do I do this also?


 

Use the output array as autoindexing input of the FOR loop!

 

Some pseudo code as a guide:

voltage array := Ramp(start, end, samples)
FOR each voltage value
  Keithley(SetVoltage)
  Get Measurements
NEXT

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(2,639 Views)

Thanks for replying,

 

 So I'm still confuzed on how the Keithley works with the Ramp pattern. Do I somehow connect one of the Keithley vi's to an input of the Ramp pattern vi? Do you have an example of how the Ramp pattern is used? I havent had a lot of experience with Labview so the pseudo code confuzes me a little!

0 Kudos
Message 3 of 5
(2,620 Views)

Hi Will,

 

for such a task I would not use the Keithley internal SWEEP feature, but only set those voltages "manually" step by step using the "usual" SetOutputVoltage commands for the Keithley!

 

This pseudocode just describes the steps of setting the voltage, reading the measurement values, incrementing the voltage value to start with the next iteration…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(2,616 Views)

I suspect you will have problems trying to step from 0V to 10V in 0.5 seconds unless you are in a real time environment.  

 

Lets say you break up the 0-10 into 0.1 volt increments.  That means you have 100 steps to perform in 0.5 seconds.  In many cases this is 100 serial commands requests in 0.5seconds or a new request every 0.005 seconds.  Windows cannot maintain this tight timing, and at some point your bus won't be able to depending on the number of steps you want to perform.  If you don't have to be that spot on in your 0.5 timing, and if you don't mind having a stair step instead of a sweep then you might be fine.  But don't expect to see a steady slope from 0-10 in 0.5 on a scope and be reliable.

0 Kudos
Message 5 of 5
(2,593 Views)