Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is Continuous Data Recording Possible For Long Records At High Rates?

I want to record a continuous set of data for a one-second interval at 100kHz sampling rate using a single active channel of a PCI-6229 multifunction board. I'm using Measurement Studio 8.1.1 and developing under Visual Studio 2005 on an XP system.

 

Is this possible? If so, can someone give me references to example code doing this?

 

My implementation has discontinuities in the recorded data every 1000 samples (10 msec) which appear to be missing about 10 msec of record in each case. I get a data available event containing 1000 samples which I process by simply putting it into a queue. A separate thread unloads the queue and writes the data to disk.

 

Before I dig into the NI documentation, I would like to be assured that this is possible (and, in the best of cases, be pointed to existing code).

 

Thanks

0 Kudos
Message 1 of 3
(2,653 Views)

Found the problem to be in specifying SampleQuantityMode.FiniteSamples rather than ContinousSamples in invoking ConfigureSampleClock.

 

Why couldn't I use FiniteSamples if I want to collect a fixed number of samples?

 

 

0 Kudos
Message 2 of 3
(2,646 Views)

Hi palley,

 

Thanks for posting!  You should use FiniteSamples if you want to collect a fixed number of samples--it is designed specifically for this purpose.  "Continuous" means that the sample clock will run indefinitely until you tell it to stop (either in software or with a trigger).  What value do you have set for samplesPerChannel?  If you are having discontinuities every 1000 samples it sounds like that this value may be set to 1000, in which case you are likely restarting the task every 1000 samples (which takes time and would account for the discontinuities).  I believe 1000 is the default for this parameter.

 

 


 

 

If you want to find an example of how to perform a Finite acquisition, I would start with the AcqVoltageSamples_IntClk example.  By default, it is installed here:

C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET3.5\Analog In\Measure Voltage\AcqVoltageSamples_IntClk

 

Of course, if the code is working the way you need then perhaps you don't need to change anything.

 

-John 

Message Edited by John P on 04-22-2009 10:30 AM
John Passiak
0 Kudos
Message 3 of 3
(2,625 Views)