LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

samples and sampling rate for analog inputs

Veejay-

 

At this point, the number of finite samples is unwired (see picture) and that defaults to 1000 samples. After that your card isn't going to read in samples anymore, unless you tell it to. You need to find out exaclty how many samples you want read from your card. If you want it to run continuously, then we need to look into what you were doing before and increase the amount of information you are reading from the card.

 

Untitled.png

National Instruments
Applications Engineer
0 Kudos
Message 11 of 37
(1,696 Views)

Hi Scott,

 

Thank you for your reply. I see what you mean. Let me explain what I am trying to do but not able to get consistency in the working of the program.

 

YEs, I do want to read continuously. I anticipate the program to run atleast 45min to 1 hour. The starting of the setup process to the actual completiion of the test. How does the buffer work? Does it empty only after it is completely filled or is it a FIFO method? Does this makes sense? Or would I need to provide more info?

 

Thanks again!

 

V

I may not be perfect, but I'm all I got!
0 Kudos
Message 12 of 37
(1,689 Views)

Going back to your original code, I would say that all you need to do is either decrease the amount of wait time from 100ms, to 6ms (9samples/1500samples per second), or change the number of samples to read from 9 to 150 (1500 samples per second * 0.1 second). This will make it so that your buffer will never overflow. If this is not what you want, let me know.

National Instruments
Applications Engineer
0 Kudos
Message 13 of 37
(1,685 Views)

Oops!  I should have updated that I have changed the code to one used in the screenshot above. except that I am reading continuously at 3000 sample rate, reading samples at 500 and no delay in the loop.

I may not be perfect, but I'm all I got!
0 Kudos
Message 14 of 37
(1,679 Views)

Then change from Finite to Continuous and you should be good

National Instruments
Applications Engineer
0 Kudos
Message 15 of 37
(1,676 Views)

Problem is that I still get the error sometimes. And I am not sure why? The buffer gets filled up. And as I said, for my application, I must expect the program to run for as long as an hour. Are you sure that this setting will not cause problems anymore?

I may not be perfect, but I'm all I got!
0 Kudos
Message 16 of 37
(1,674 Views)

Your computer may not be fast enough to process the data, even when you have no wait time, it is still taking up more time to process the data then the card has the ability to bring in the data. There would be no reason to increase the buffer, when you are reading from the stream continuously, because there is no such thing as an unlimited buffer, so eventually you will always run out of buffer space. You can increase the buffer by using the DAQmx configure Input Buffer.vi in the advanced task options. Your best bet, however, is to use a read property node and use that to view the number of elements that are in the buffer, so you can see at what rate causes the computer to be unable to keep up with the 6008.

Untitled.png

National Instruments
Applications Engineer
0 Kudos
Message 17 of 37
(1,658 Views)

I tried this and I keep getting "Availablesamples per channel" as zero "0". What does that imply?

I may not be perfect, but I'm all I got!
0 Kudos
Message 18 of 37
(1,640 Views)

Are you getting the Available samples as zeero, and you are getting an error message? If you are, what is the specific message with all of these conditions?

National Instruments
Applications Engineer
0 Kudos
Message 19 of 37
(1,635 Views)

I dont see any error is running and the Available samples per channel indicator shows 0

I may not be perfect, but I'm all I got!
0 Kudos
Message 20 of 37
(1,629 Views)