10-26-2007 10:24 AM
10-29-2007 06:25 PM
Hello Mike,
Thanks for contacting National Instruments.
By default, DAQmx tasks will timeout after 10 seconds. With a trying to read 15000 samples at 1000 Hz will take 15 seconds which will cause the read statement to timeout before the read operation can be completed. This default value can be changed by modifying the Timeout property for the DAQmx task:
myTask.Stream.Timeout = TimeoutValue
Where TimeoutValue is specified in milliseconds. A value of -1 will force the reader.ReadMultiSample(15000) to wait indefinitely until all of the required samples have been read.
The tutorial Using NI-DAQmx in Text Based Programming Environments and this forum post are great starting places for programming data acquisition in text based environments.
DAQmx includes several shipping examples for text based languages that are also useful for building applications. The DAQmx readme file shows the location of these examples on your computer. This file is also installed with DAQmx and can be found in the shortcuts folder for DAQmx.
Getting Started with NI-DAQmx and Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications are also great starting points for programming with DAQmx. The techniques described in these documents are based in LabVIEW, but can be applied to text based programming with DAQmx.
10-30-2007 12:34 PM
BrowningG,
Thank you so much for answering so quickly. I knew it had to be some sort of default or setting I couldn't find. It works great now.
Thanks also for the references to the tutorials and other information. I will read and use them so I know more about setting parameters, etc. for future projects.
Thanks again!!
Mike