LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to encrease operation speed when measure with Keithley 6430

But in my case every voltage value need about 14 byte. So Visa Read spend about 1 ms for read (baude rate is 9600, which corresponds to 9600 byte/s ).  I do not think that it is a problem of RS232 speed.

For 20 measured voltage (as in my case) program should spend about 20 ms. But I got result after 30 s.

 

0 Kudos
Message 11 of 24
(3,064 Views)

@cstorey wrote:

Yes, minimize the number of commands you send over the RS232 and have the 6430 do your averaging calculations.

 

 


Hmm, I send command READ? every time as I measure the voltage. Device give answer in 14 byte. According to configuration of RS232, baud rate is 9600. As I know it can get 9600 byte/s. For 14 byte program should spend 1ms.

 


@cstorey wrote:

 

What sort is the current level you source and the voltage you read? 

 


I do not understand question. For real sample I will change DC current from -10 to 10 microA. And DC voltage will be between -1 to 1 V.


@cstorey wrote:

 

Attach your VI and people can more easily help you.  The pictures of your code aren't that much help to anyone.


Yes, thank you for remind. I added. I used several function from NI library driver. The link is in third topic message.

0 Kudos
Message 12 of 24
(3,061 Views)

You're forgetting a lot of steps that take a lot of time in your code.

 

1) Every loop you are sending a command to set the current.  The instrument needs to receive the command, process the command and allow current to settle. (Atleast 20ms, maybe 1s depending on current value.)

 

2) Then you send a "READ?" command. Instrument needs to measure (unknown time given all the auto settings), convert reading to ASCII and transfer it over the bus.  From memory measurement time is something like 1ms (1-100V) 1s (10mV), 10s (10u-10mV), >10s (<10uV)?  Remember this instrument is sensitive enough to resolve <1fA (1E-15A!)  its not meant to be fast but accurate.  Having said that there are lots of ways to make it much faster, similar to a K2400 if you disable auto settings, set ranges to constant values.

 

You can speed things up 2 ways:

1) Reduce the number of times you send info to and from the instrument, you could use the memory buffer or the built in sweep.  Here's an example of the built-in sweep. Personally, if I was doing this I would source I, measure V and use a linear fit to get R but for simplicity I went with R=V/i here since that's what you did in your VI.

sweep_I_measure_V_cds.png

 

2) Disable the auto-scaling, auto-zero, auto-range, set NPLC, etc..  For starters I haven't bothered with that.  Try this code first, report on speed and we'll go from there.

 

Craig

 

 

0 Kudos
Message 13 of 24
(3,034 Views)

@q232 wrote:

Thank for all comments. 


@RavensFan wrote:

A couple of tips to start.

 

First,  use block diagram cleanup.  You've have a lot of wires running in numerous directions including backwards with many bends.  That makes it much more difficult to read.  Some wires disappear off the edges of the structures.

 

 


I do not understand about  "block diagram cleanup".  All wire in VI I need. I make them all visibale. But how can it be better prepared for reading?

Block diagram cleanup is an icon on the toolbar.  (Unless you have a fairly old LabVIEW version.  Click it.  It doesn't get rid of wires.  It cleans them up so they are visible, straight, and not running backwards.

 


@RavensFan wrote:

 

Second, put a wait function in that loop where you are continually polling the start button.  That loop is running as fast as it can constantly sending out data to that resource.  That could be clogging the device with commands that take longer for it to process than LabVIEW is sending them.

 


I need while loop, because it is important connect sample after open the  power and measure channels. I pulled out OUTPUT VI from while loop. In this case will it be better ?

No need to check to see if the button is pressed every fraction of a second.  An event structure could help as well.  Don't send the code until AFTER the loop ends.

 


@RavensFan wrote:

 

 

Third, use your error wires between the VISA functions.

 

Fourth, "Step" which from the code seems to mean "number of steps" should be an integer, not a double.


 Yes, I added error wires. But I have not error handler for this device. How do I understand which error arise?

Put an indicator on the front panel for the simplest way of seeing what the error is.

Sure, "number of steps" should be integer. I added some protection now.

 


@RavensFan wrote: 

I don't see any 4 point averaging that you talk about.  I don't see where you are reading 10 voltages.  If you do have 2 currents and 10 voltages, I take that to mean you have 20 different steps going on.  For 30 seconds, that is 1.5 seconds per step.  Have you checked the timing of the VISA functions?  Perhaps it takes the device that long to return a response.  I don't see anything else in your LabVIEW code that would cause it to take longer than you think it should.


 According to manual, I should chose source and measurement function, then device will be work in 4-point measurement rerime. I confige quantity of voltage measument, when I send "number of steps"  for small FOR Loop (see update pictures). 

Your comment about  timing of the VISA functions is right. It was my first think. But I do not know how to check this time. Also I do not find any time option in VISA Read function.

Put some small flat sequences and an Get Time function in it with a wire passing through.  Put an indicator there.  If you put that before and after some key VISA functions and look at the difference in times to see how long certain sections of code take to run.

 

first part.jpgmiddel part.jpglast part.jpg


 

0 Kudos
Message 14 of 24
(3,027 Views)

I am sorry for delay answer. I was out of office. I will check all and answer.

0 Kudos
Message 15 of 24
(3,011 Views)

Thank you for your notice. It is very useful for me

0 Kudos
Message 16 of 24
(3,009 Views)

@q232 wrote:

 


Hmm, I send command READ? every time as I measure the voltage. Device give answer in 14 byte. According to configuration of RS232, baud rate is 9600. As I know it can get 9600 byte/s. For 14 byte program should spend 1ms.

 


No, you can get 9600 bits/sec. 1 char is 8 bit+stopbit(s), so usually 9. Ýou can read 1066 chars/sec, pretty much 1ms/char. If you also need to send ~8 chars as command you're up to ~25ms/read.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 17 of 24
(3,007 Views)

Dear cstorey,

 

I try your code. It  works strange. 

 

Fig, 1.jpg

As a test sample I use 1kOhm resister. Keithley returns resistance between 937-1070 Ohm (see Fig. 1) for current 10 microA to 100 microA. It is ok.

 

 

 

 

 

 

 

 

Fig, 2.jpg

 

 

 

 

But for current microA to 10 microA the resistance jumps between  840 - 2000 Ohm (see Fig. 2). I think it is some noise. To avoid it, I want to measure voltage for each current value several times and write average. For me it is not clear  how to realize such algorithm with function SweepMeas from library.

 

About speed. For 10 Steps Keithely spends 35 s.

With disable the auto-range in SweepMeas function it spends about 10-20 s for 10 steps.

0 Kudos
Message 18 of 24
(2,976 Views)

I agree, there are a few strange things happening there.  Why is the sourced current not reaching the right set point during the sweep?  I suspect you need to look for poor contacts and also supply a delay time in the measurement to allow for settling.  I supplied an updated version of the program with a few more knobs to turn.  (Auto-zero; use ON or Once), I'm using NPLC caching and setting the averaging to 0.1 power line cycles (PLC) to speed up measurement.  The commands are 

 

:SYST:AZER:CACH:STAT ON;
:SENS:CURR:DC:NPLC 0.1;

 

Let me know if they cause errors.  I can't test the code. 😉

 

Averaging won't help if your setup is poor.  You would be building errors into your measurements.  An SMU is a complicated beast!  Its already doing a lot of averaging for you as it auto-ranges to get the best measurement it can.  Taking repeats of the same thing won't really help.

 

But, why not supply more current and reduce the noise?  You are supplying 1uA to a 1kOhm resistor which means you are measuring 1mV.  That's a pretty low signal level and susceptible to noise pickup unless you are careful about shielding and cable setup.  (Resistors can be noisy!)

 

My approach to resistance measurements is to sweep current, usually in log steps over 2 decades, and measure current and voltage.  I try to make sure the measured voltage is in the 100mV-1V range where meter error is minimal.  I then fit the measured results on a linear scale (R=V/i) and extract the resistance using a linear regression.  I use the residuals of the fitting process to determine quality of devices/measurements. 

 

This particular meter also has a built in Auto-Ohms measurement method.  It does a logarithmic current sweep for you and just returns a single resistance value.  Very fast and in my experience very accurate for devices that you know to be ohmic.  (The only reason I do a sweep is to determine if a device is ohmic.  If I am sure of that then I usually use the Auto-Ohm method to look at device-device variations.)

 

See how the new version work.

Download All
Message 19 of 24
(2,959 Views)

@cstorey wrote:

 

:SYST:AZER:CACH:STAT ON;
:SENS:CURR:DC:NPLC 0.1;

 


Wow.

I never realised I could program SCPI using emoticons. I've been blind all these years it looks so much more fun when displayed like that! (but it is less readableSmiley Frustrated).

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 20 of 24
(2,947 Views)