![Bustec ProDAQ 3411 User Manual Download Page 26](http://html.mh-extra.com/html/bustec/prodaq-3411/prodaq-3411_user-manual_2835673026.webp)
3411-XX-UM
ProDAQ 3411 24-Ch. ADC Function Card User Manual
Page 26 of 40
Copyright,
1998-2009 Bustec Production Ltd.
This is also the arrangement of the data in the output array when the parameter
fillMode
is
specified as
bu3411_GROUP_BY_SCAN
. But most of the time it is more convenient to have the data
arranged on a per channel basis. Therefore, the function
bu3411_acquireWaveforms()
will re-
arrange the data while transferring it to the output array when the parameter
fillMode
is specified as
bu3411_GROUP_BY_CHANNEL
. The result is an arrangement like
Data
1 Data 2 Data 3
Data
n
Data
1 Data 2 Data 3
Data
n
Data
1 Data 2 Data 3
Data
n
Channel 1
Channel 2
Scan n
The complete number of samples as specified by the parameter
numberOfScans
for the first
enabled channel is placed into the output array, then the complete number of samples for the
second enabled channel and so on.
5.5. Asynchronous Acquisition
To acquire data continuously, the ProDAQ 3411 needs to be configured for scanning the input
channels and moving the data into the on-board FIFO. The FIFO memory stores the data until the
host computer is ready to read out the data. The timing for this asynchronous read-out depends on
the amount of data in the FIFO.
The driver function
bu3411_startAcquisition()
can be used to configure the card for scanning
and starting the acquisition. The parameter
channelMask
defines which channels should be
enabled for scanning. The parameter
inputTriggerSource
selects the source for the scan clock. If
the internal clock is chosen, the parameter
scanRateHz
defines the scan rate used. The parameter
conversionTime
can be used to adjust the timing a described in “3.3.3 - Data Conversion”. A
special value, defined as
bu3411_ADJUST
in the header file allows the driver to automatically
choose the correct value.
Figure 15 – Starting the Asynchronous Acquisition
To read out the acquired data at the right time, the application can either poll the status of the
acquisition using the function
bu3411_checkAcquisition()
or install a callback prior to starting
{
ViSession session;
/* .... */
/*
* Start the asynchronous acquisition for channels 1-8, 18, 20, Ground and Volt. Ref.
* using the internal clock at a rate of 100 Hz. The conversion time is automatically
* adjusted by the driver.
*/
if ((status = bu3411_startAcquisition (session, 0x020900FF,
bu3411_ITRI_SRC_INT,
100.0, bu3411_ADJUST)) < VI_SUCCESS)
{
bu3411_error_message (rm_session, status, descr);
printf (“Error: bu3411_ startAcquisition () failed due to %s\n”, descr);
return -1;
}
/* ... */
}