Vous êtes sur la page 1sur 1

Cart | Help Search

Yo u a r e h e r e : N I H o m e > S u p p o r t > M a n u a l s > N I - D A Q m x H e l p

Continuous Acquisition and Generation with Finite Buffer Size


Table of Contents

The NI-DAQmx API uses circular buffers as shown in the following figure. For input operations,
portions of data are read from the buffer while the buffer is filled. Likewise for output NI-DAQmx Help
operations, portions of the buffer can be written to while the buffer is emptied. Using a
circular buffer, you can set up your device to continuously acquire data in the background Edition Date: July 2015
while NI-DAQmx retrieves the acquired data.
Part Number: 370466AC-01

View Product Info


Download Help
(Windows Only)

When a continuous operation reaches the end of the buffer, it returns to the beginning and fills up (or in the case of output
operations, reads from) the same buffer again. Your input application must retrieve data in blocks, from one location in the buffer,
while the data enters the circular buffer at a different location, so newer data does not overwrite unread data.
While a circular buffer works well in many applications, two possible problems can occur with this type of acquisition: Your
application might try to retrieve data from the buffer faster than data is placed into it, or your application might not retrieve data
from the buffer before NI-DAQmx overwrites the data into the buffer. When your application tries to read data from the buffer that
has not yet been collected, NI-DAQmx waits for the data to be acquired and then returns the data. If your application does not
read the data from the circular buffer fast enough, you receive an error, stating that some data has been overwritten and lost. If
losing data in this way is not important to you, change the setting of the OverWrite Mode attribute/property.
Parent topic: Buffering

Your Feedback! Poor | Excellent Yes No

Document Quality? Answered Your Question?

Add Comments 1 2 3 4 5

My Profile | Privacy | Legal | Contact NI 2017 National Instruments Corporation. All rights reserved. | E-Mail this Page

Vous aimerez peut-être aussi