Measurement-computing Data Acquisition Systems rev.10.4 Uživatelský manuál Strana 202

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 366
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 201
Dynamic Waveform/Pattern Mode with Circular Buffer
If the waveform/pattern output mode has been defined to be dynamic (see daqDacSetOutputMode) and a
circular output transfer buffer is to be used, then the following will need to be performed to complete the
dynamic waveform/pattern output operation:
Specify the output transfer buffer location and details with the daqDacWaveSetBuffer function.
The specified buf parameter must point to memory which has already been allocated by the
application prior to calling this function. The allocated buffer must be large enough to hold the
number of output updates for each channel required for the block of data to be transferred as
determined by the current waveform/pattern output channel configuration.
Configure any waveform/pattern settings (such as update mode, trigger sources, frequency settings
that need to be configured
Call the daqDacTransferStart function to download the output transfer buffer into the internal
waveform/pattern output FIFO on the device.
DacWaveSetTrig function. Arm the waveform/pattern output by issuing the daq
Trigger the waveform/pattern output (if necessary).
Monitor status of the dynamic waveform/pattern output calling the daqDacTransferGetS
function. The total amount of data transferred from the circular output transfer buffer to the
waveform/pattern output FIFO on the device will be returned in the retCount parameter. The
current position of the next data block to be written to the waveform/pattern output FIFO o
device can be calculated using the value of the retCount parameter. Please refer to the
daqDacTransfe
tat
n the
rGetStat function for a complete discussion of calculating the current write
position pointer.
tered
. However, a
h have already been written but not updated. This function
Dyn
ed according to the output channel for which it will be output. Each update data block is ordered
as follows:
DAC0 DAC1 DAC2 DAC3 P3 DO
In general, the size allocated should be at least large enough to handle any delays that may be encoun
between buffer updates by the application without the buffer running completely empty. As the
waveform/pattern output progresses, the waveform/pattern output FIFO on the device will be filled by
emptying the unread data in the output transfer buffer. This value can vary, depending upon the ability of the
application to frequently update the buffer, and the update rate at which the outputs are clocked
good general rule is to make the size of the output transfer buffer at least that of the size of the
waveform/pattern output FIFO on the device.The filling of the output FIFO with data in the output transfer
buffer is performed automatically by the driver without checking whether the application has updated the
buffer. Therefore, the application needs to be aware of the current write position within the buffer, as well as
feeding new data updates to the buffer portions whic
should be called with the DdtmCycleOn flag set.
amic Output Transfer Buffer Organization
The output transfer buffer is organized into sequences of update data blocks. Each update data block represent
the sample data necessary to update all output channels configured for waveform/pattern output. The sample
data is order
If any of the above channels is not configured for waveform/pattern output, then it will simply not be included
in the update data block--however, the channel ordering will not change. If, for example, a waveform/pattern
output is configured for DAC0, DAC2 and P3 DO will have the following update data block:
DAC0 DAC2 P3 DO
4.4-20 Daq API Command Reference 908494 Programmer’s Manual
Zobrazit stránku 201
1 2 ... 197 198 199 200 201 202 203 204 205 206 207 ... 365 366

Komentáře k této Příručce

Žádné komentáře