Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Couple DAQmx Questions

I'm using Measurement Studio with Visual Studio 2008.  I have a DAQ component configured for 50000 samples.

 

The first question I have is, I have some Read statements where the number of samples is set to 2500, and they do return 2500 sampels to the data array.  When these Reads execute however, does the DAQ hardware still dump 50000 samples to the computer and the routines only pass 2500 of them on to me?  Or, does the hardware only dump the 2500 that I'm asking for? 

 

The second question is, if you want to change the way a DAQ is configured, i.e. change the number of samples or the sample rate, can you have two different DAQ Components configured differently for the same DAQ hardware, and then use one or the other?

 

Thanks,

Randy

 

0 Kudos
Message 1 of 2
(2,999 Views)

Hi Randy,

 

As for your first question, the DAQ hardware is indeed acquiring 50000 samples but only 2500 of them are being passed according to your configuration.

 

Regarding your second question, you can actually have any number of Tasks configured differently for the same DAQ hardware, nevertheless, you can't have more than one of those Tasks running at the same time, if they are using the same resources. Therefore you must free up common resources by stopping the task before another task starts using the same resources.

 

You might also find interesting to read the Buffering Topic in the NI-DAQmx help which might give you a clearer idea about how data is acquire: You will have to open the NI-DAQmx Help, switch to the Contents Tab and then, navigate to NI-DAQmx Help >> NI-DAQmx Key Concepts >> Reading and Writing Data >> Buffering. 

 

I hope I have answered your questions. Feel free to telling me if you require any further help.

 

Best regards,

Anzurio
0 Kudos
Message 2 of 2
(2,978 Views)