
Writing your own software
8
Copyright © 2010-2011 Pico Technology Ltd. All rights reserved.
usbdrdaqpg.en
3.4
Capture modes
Three modes are available for capturing data:
BM_SINGLE:
collect a single block of data and exit
BM_WINDOW:
collect a series of overlapping blocks of data
BM_STREAM:
collect a continuous stream of data
BM_SINGLE
is useful when you wish to collect data at high speed for a short period:
for example, to collect 1000 readings in 50 milliseconds.
BM_WINDOW
is useful when collecting several blocks of data at low speeds - for
example when collecting 10,000 samples over 10 seconds. Collecting a sequence of
single blocks like this would take 10 seconds for each block, so displayed data would
not be updated frequently. Using windowing, it is possible to ask for a new block more
frequently, for example every second, and to receive a block containing 9 seconds of
repeat data and 1 second of new data. The block is effectively a 10-second window
that advances one second per cycle.
BM_STREAM
is useful when you need to collect data continuously for long periods. In
principle, it could be used to collect data indefinitely. Every time
is called, it returns the new readings since the last time it was called. The
noOfValues
must be sufficient to ensure that
the buffer does not overflow between successive calls to
. For
example, if you call
every second and you are collecting 500
samples per second, then
noOfValues
must be at least 500, or preferably 1000, to
allow for delays in the operating system.
19
14
19
19
Summary of Contents for DrDAQ
Page 2: ......