Daqadctransfersetbuffer, Daqadctransferstart – Measurement Computing WaveBook rev.3.0 User Manual
Page 213

WaveBook User’s Manual,
6-24-99
daqX API - Command Reference D-17
daqAdcTransferSetBuffer
DLL Function
DaqAdcTransferSetBuffer(DaqHandleT handle, PWORD buf, DWORD scanCount, DWORD
transferMask);
C
DaqAdcTransferSetBuffer(DaqHandleT handle, PWORD buf, DWORD scanCount, DWORD
transferMask);
Visual BASIC
VBdaqAdcTransferSetBufferAllocMem&(ByVal handle&, ByVal scanCount&, ByVal
transferMask&)
Delphi
daqAdcTransferSetBufferAllocMem(handle:DaqHandleT; scanCount:DWORD;
transferMask:DWORD)
handle
Handle to the device for which an ADC transfer is to be performed.
buf
Pointer to the buffer for which the acquired data is to be placed.
scanCount
The total length of the buffer (in scans).
Parameters
transferMask
Configures the buffer transfer mode.
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqAdcTransferStart, daqAdcTransferStop, daqAdcTransferGetStat, daqAdcSetAcq,
daqAdcTransferBufData
Program References
ADCEX1.C, DACEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS (Delphi), ADCEX9.C, ADCEX10.C
Used With
All devices
Description
daqAdcTransferSetBuffer
allows you to configure transfer buffers for ADC data acquisition. This function can be used to configure
the specified user- or driver-allocated buffers for subsequent ADC transfers.
If a user-allocated buffer is to be used, two conditions apply: (a) The buffer specified by the buf parameter must have already been
allocated by the user prior to calling this function, and (b) The allocated buffer must be large enough to hold the number of ADC scans
as determined by the current ADC scan group configuration.
The scanCount parameter is the total length of the transfer buffer in scans. The scan size is determined by the current scan group
configuration. Refer to the daqAdcSetScan and daqAdcSetMux functions for further information on scan group configuration.
The character of the transfer can be configured via the transferMask parameter. Among other things, the transferMask specifies the
update, layout/usage, and allocation modes of the buffer. The modes can be set as follows:
DatmCycleOn
- Specifies the buffer to be a circular buffer in buffer-cycle mode; allows the transfer to continue when the end of the
transfer buffer is reached by wrapping the transfer of ADC data back to the beginning of the buffer. In this mode, the ADC transfer buffer
will continue to be wrapped until the post-trigger count has been reached (specified by daqAdcSetAcq) or the transfer/acquisition is halted
by the application (daqAdcTransferStop, daqAdcDisarm). The default setting is DatmCycleOff.
DatmUpdateSingle
- Specifies the update mode as single sample. The update mode can be set to update for every sample or for
every block of ADC data. The update-on-single setting allows the ADC transfer buffer to be updated for each sample collected by the
ADC. Compared to the block mode, this setting provides a higher degree of real-time transfer-buffer updating at the expense of slower
aggregate-data throughput rates. The default setting is DatmUpdateBlock.
DatmDriverBuf
- Specifies that the driver allocate the ADC acquisition buffer as a circular buffer whose length is determined by the
scanCount
parameter with current scan group configuration. This option allows the driver to manage the circular acquisition buffer rather
than placing the burden of buffer management on the user. This option should be used with the daqAdcTransferBufData to access
the ADC acquisition buffer. The daqAdcTransferStop or the daqAdcDisarm function will stop the current transfer and de-allocate the
driver-supplied ADC acquisition buffer. The default setting is DatmUserBuf. The DatmUserBuf option specifies a user-allocated ADC
acquisition buffer. Here, buffer management must be done in user code. This option should be used with the daqAdcTransferStart
function to perform the ADC data transfer operation.
daqAdcTransferStart
DLL Function
daqAdcTransferStart(DaqHandleT handle);
C
daqAdcTransferStart(DaqHandleT handle);
Visual BASIC
VBdaqAdcTransferStart&(ByVal handle&)
Delphi
daqAdcTransferStart( handle:DaqHandleT )
Parameters
handle
Handle to the device to initiate an ADC transfer
Returns
DerrNoError
No error (see the API Error Codes table at the end of this chapter).
See Also
daqAdcTranferSetBuffer, daqAdcTransferGetStat, daqAdcTransferStop
Program References
ADCEX1.C, DYN32ENH.C, DAQEX.FRM (VB), ADCEX.PAS (Delphi)
Used With
All devices
Description
daqAdcTransferStart
allows you to initiate an ADC acquisition transfer. The transfer will be performed under the current active
acquisition. If no acquisition is currently active, the transfer will not initiate until an acquisition becomes active (via the daqAdcArm
function). The transfer will be characterized by the current settings for the transfer buffer. The transfer buffer can be configured via the
daqAdcSetTransferBuffer
function.