LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to acquire higher sampling in compact daq

hai all
 I am using cDAQ 9172 and 9237,9215,9263,9411,9472 modules, where my daq control code i am not able to acquire more than 10 to 20 samples, where i have tried cople of things which doesnt helped me, anybody have idea on this please send me a sample code and acquisition method,
0 Kudos
Message 1 of 2
(2,753 Views)

Hi Kodeeswaran,

There are several possibilities for why you’re not getting more samples. If you’re doing an N sample acquisition, check the number of samples you’ve set to be read. If you’re doing a continuous acquisition, check that your sample rate is set correctly. Sampling too slowly could result in a small number of samples if the duration of the acquisition is not sufficiently long.  Also, make sure that your acquisition isn’t being stopped prematurely. Finally, you might be timing out. Check your signal source for valid data with a multi-meter.

If you’re using the DAQ Assistant, there’s the chance that you’re trying to acquire faster than your CPU can keep up with. This is because the DAQ Assistant will repeat initialization and termination steps with each iteration of its controlling loop. The attached images show the DAQ Assistant method in a while loop for continuous acquisition and a more efficient method using the DAQmx subVIs. Notice how the initialization and closing steps are only executed once.



There are several resources that are extremely useful for DAQmx programming. If you are using LabVIEW or CVI, I highly recommend starting with one of the shipping examples. These can be found in the NI Example Finder which is under Help » Find Examples… When the Example Finder loads, browse by task to Hardware Input and Ouput » DAQmx. Try running analog input, analog output, and DIO examples with your current hardware configuration. Also, if you’re programming with LabVIEW, I recommend checking out the NI Developer Zone Tutorial: Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquis.... For text-based DAQmx programming, I suggest the KnowledgeBase Article: Programming NI-DAQ in Text-Based Languages.

If you have any questions, please post back. Keep in mind that the more information you share, the more specific my answer can be. Include information about your signal source and your acquisition configuration (including sampling rate, sampling type, etc.). Also, screen shots or reduced code sections are very helpful.

Message Edited by ryan_d on 10-22-2007 04:28 PM

Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments
Download All
0 Kudos
Message 2 of 2
(2,719 Views)