Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to get greater than 1000times x 0.5ms sampling, with my USB6210

Hi Guys:
     I got a really urgent question of Labview for my lab work.  I want to get a program that do pulse counting for 500us and repeat this process as fast as it can. I have programmed a protocal with USB6210's own time base 100KHz. It works well on sampling 500us samples but it just won't be able to sampling as fast as I want. So if the computer is samples the 500us sample one after another it should be able to get 2000 samples per second, But I only got like 20 samples per second. I think that must be the operation of each loop has a time limite that won;t let it go faster?  I'm not sure what should I do to get the loop go faster. >.<

Any advise will be very helpful to me since I'm really new to Labview and DAQmx.

Thanks for reading.  My email:squallbob@gmail.com

And Thanks for Help!

Squallbob
0 Kudos
Message 1 of 9
(3,175 Views)

Hi Squallbob,

I'm not sure what you are doing in your current program, but there are some example VIs that ship with LabVIEW which I would suggest you take a look at.  From your description of your application, you should be able to use one of these examples with little or no modifications to do what you are wanting to do.  See the VIs at C:\Program Files\National Instruments\LabVIEW 8.2\examples\DAQmx\Counter\Count Digital Events.llb.

Let me know if you have any questions about these examples!

0 Kudos
Message 2 of 9
(3,163 Views)
Hi Elizabeth:
   Thanks for your reply.  My project is using NI card to count Pulse for a short period of time , say 1ms for 1 sample. My problem is I can't get more than 50samples ( or around) per second (50 samples x 1ms =50ms <<1s). Yes I used one of the sample in NI sample lib  and  I modified it so that it can count pulse for a short period of time. but I need the Program to take the measurement more than 200 times per second (which is like 10 samples (1ms sample) per second).
   I'm wandering whether the loop has a limited time that can't get it run faster or I should change for another card other than usb 6210?
   How can I make the loop (1 loop per measurement) go faster. or How can I get the program to obtain  200 samples per second. Every time after the program get one sample from the counter, it has to be resetted to 0 which I use ClearTask to do that.

Thanks for your kindly help.
Fang
0 Kudos
Message 3 of 9
(3,152 Views)

for a short period of time. but I need the Program to take the measurement more than 200 times per second (which is like 10 samples (1ms sample) per second). <-----------------Sorry It's confused here

I mean I need 200 times measurement (include reset after each measurement) per second but Right now my program just give me 10 measurements per second. ...

Sorry for the confusing

0 Kudos
Message 4 of 9
(3,144 Views)
Hi

Can you please post your vi or screen shot of your VI...
(A screenshot is preferred)

Vijay
0 Kudos
Message 5 of 9
(3,132 Views)

Hi Fang,

I should have mentioned, you will want to use the example that performs buffered edge counting.  This is important because you can count much faster with a buffered edge count task since it is using hardware timing.  If you aren't familiar with what buffered event counting is, you may want to read NI Developer Zone: Buffered Event Counting.

Were you using the buffered edge counting example before, or one of the others?

0 Kudos
Message 6 of 9
(3,120 Views)
Hi Elizabeth L / Dear NI lovers:
    Thanks for your reply. I tried buffered sampling and it did increased my loop speed and I can take 25sample per second now. But I still need a faster sampling speed. I'm thinking to change method of sampling. Here's my question with my new sampling method:

1. I want sampling (count events)  for only 0.1ms                                                               <------------------------I don;t know how to do this with my card 6210.
2. I need to reset the counter after each sampling, and start another sampling again.      <------------------------I can put stop task to reset the counter and using loop to do this?
3. I need to repeat this as fast as possible (like 200-1000 samples/S).                            

So, my main question is for #1. I don't know how to do 0.1ms sampling (counting events for 0.1ms) with 6210.   Help ^ ^

I do have a 6008 before but the sample rate isnt high enough and won't work for my 30ns pulse, so I changed to 6210.

Thanks for all your time.
Looking forward to your reply

Fang
0 Kudos
Message 7 of 9
(3,104 Views)

Hello Fang,

It sounds like you may not be configuring the buffered edge count task correctly.  The sample clock source for this task should be a pulse train (you may want to generate this with your other counter).  Every time there is a pulse on the sample clock, the count register value will be read.  This pulse train can certainly run at a rate of 10 kHz to achieve 0.1 ms sampling.

I suggest you read the tutorial Buffered Event Counting to learn more about how to correctly configure your task.

Please let me know if any of this is unclear and I would be happy to go into more detail.

0 Kudos
Message 8 of 9
(3,085 Views)
Thanks Elizabeth:
    I got that buffered sample and fit it quite well to my project now. Thanks for all the help and patient.


Fang
0 Kudos
Message 9 of 9
(3,071 Views)