LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increasing sample rates

Hi,

 

First I'll expain what I'm trying to do, then I'll explain what my problem is.

So I have an Agilent 34401A DMM and a Keithley 6221 Current Supply. I'm trying to measure voltage with as many samples as possible in a given time (somewhere around 500 samples per second is fine; 1000 samples per second is ideal, but I realize that it may not be possible). According to Agilent's website,  there are certain steps to be taken in order to acheive 1000 samples per second, found here: http://www.home.agilent.com/agilent/faqDetail.jspx?cc=US&lc=eng&ckey=1000001257:epsg:faq&nid=-536902...

I've done everything that they call for on that page, however, I'm still stuck in the 60-70 ms/sample realm. Also, the samples aren't at a steady intervals. The interval ranges from around .065 seconds to .080 seconds (as you can see from the attached .txt file). I've also tried to use the Fetch Measurement VI, as others have used, but I can't seem to get it to work. LabVIEW will let me start the VI, but it won't let me stop it via the stop button.

 

If someone could take a look at my VI and note any problems you see (related or not), I'd be very appreciative.

 

thanks in advance,

anandonaqui

 

PS: I know this is a pretty basic question, but how do I specify an exact time for the timed loop to run? 

Download All
0 Kudos
Message 1 of 17
(4,751 Views)

Since you are reading 1 sample at a time, I believe the speed of your loop is being limited by how quick the VISA resources can write to and read from the instrument.  I think if you use some other functions to read multiple samples at once, it will run faster.

 

To set the loop time, double click on the blue box to the upper left corner of the loop.  Set the dt time for milliseconds.  That or you can wire a constant (or programmatically calculate a value) to put into the dt terminal.

0 Kudos
Message 2 of 17
(4,734 Views)
I don't think that article is even close to complete or there is more to it than what you linked. You need to use the function 'Configure Multipoint' and set the sample rate and number of samples and then you can do a single initiate and have the instrument scan multiple times. No need for a loop at all. Set the polymorphic instance to Multiple Points instead of Single and look at the block diagram.
Message 3 of 17
(4,728 Views)


(disclaimer!!!!) I really DO like Keithley instruments--- They just need "adapting to"

 

 

the instrumnt (62xx) gets its timing from zero crossings of the line frequency (60Hz in US 50 Hz in Asia)

 

 

It works well with a 400Hz motor-generator as well!! F(line) [Frequency, of the line voltage] is the limiting factor.

 

 

 

 

Message Edited by Jeff Bohrer on 07-09-2009 12:13 AM

"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 17
(4,721 Views)

Jeff,

 

I'm not exactly clear on how the current supply is limiting the sample rate. As of now, I'm just running the current supply manually (not through LabVIEW) and the multimeter and the DMM are not linked.

Message Edited by anandonaqui on 07-09-2009 09:57 AM
0 Kudos
Message 5 of 17
(4,695 Views)

It's not relevant.

 

Have you tried my suggestion? I looked again at the functions in the driver and I would modify the Read (Multiple Points) function in order to pass it the sample interval to the Configure Multipoint function that it is calling. First configure everything per the Agilent page and then call the modified Read Multiple.

0 Kudos
Message 6 of 17
(4,686 Views)

Dennis,

 

I did try your suggestion, but I'm having a bit of trouble with the array. It won't allow me to wire the build array VI to the 2D portion of the Write to Spreadsheet VI, and when I pull up the .txt file, I get a 1-D array (obviously) with no time, even though I have the Elapsed Time wired to the first element terminal.

 

I tried to fix this by placing the Timer and the Build Array inside a For Loop, which worked, sort of. It took 1000 samples, as I specified, but it took 309 samples at t=0 and 691 at t=.016 seconds. Another problem I'm getting is that all the voltage readings in the .txt file are 0.

 

I've attached the VI.

 

thanks

0 Kudos
Message 7 of 17
(4,678 Views)
First, you did not modify the Multiple Points VI to add the sample interval input. It calls confgure Multipoint and it is resetting it to the default. That is why I asked you to look at the diagram of the read Multiple Points. Second, as soon as the VI starts, The elapsed time runs and returns 0 because 0 time has actually elapsed. It does not return the time when some function is done. That's a misunderstanding that you have with dataflow. Third, I don't quite understand how you want your data saved. Do you want some sort of time stamp in one column and the data in the other? If so, explain the format of the time that you want and how you are planning to acquire it.
Message 8 of 17
(4,674 Views)
Please do us a favor and rename your VI without the #1 in it.  Because of that, we can't click on the filename to open it.  Everything from the # sign on including the extension gets cut off and it pops up a message that it doesn't know which program to open it with.  (I would bet that is because # is special symbol in HTML formatting.)
0 Kudos
Message 9 of 17
(4,673 Views)

Dennis Knutson wrote:
First, you did not modify the Multiple Points VI to add the sample interval input. It calls confgure Multipoint and it is resetting it to the default. That is why I asked you to look at the diagram of the read Multiple Points. Second, as soon as the VI starts, The elapsed time runs and returns 0 because 0 time has actually elapsed. It does not return the time when some function is done. That's a misunderstanding that you have with dataflow. Third, I don't quite understand how you want your data saved. Do you want some sort of time stamp in one column and the data in the other? If so, explain the format of the time that you want and how you are planning to acquire it.

Ooops, I misunderstood. I've edited the Multiple Points VI and entered .001s as the sample interval input. As for the timing, what I'm trying to get is a time stamp for each measurement. For example, lets say the DMM takes a reading every second, I want the time to show that as such:

 

time:      Voltage:

0            0

1            10

2            15

3            17

etc.

 

Now that I think of it, it seems like the Elapsed Time VI is not the right solution, but I'm at a loss as to how I can assign a time stamp to each measurement.

 

EDIT: I've attached a renamed VI. Sorry about that.

Message Edited by anandonaqui on 07-09-2009 11:40 AM
0 Kudos
Message 10 of 17
(4,657 Views)