beautypg.com

Digilent WaveForms User Manual

Page 60

background image

WaveForms™ SDK Reference Manual

Copyright Digilent, Inc. All rights reserved.

Other product and company names mentioned may be trademarks of their respective owners.

Page 60 of 85


FDwfDigitalInStatusIndexWrite
(HDWF hdwf,

int

*pidxWrite)

Parameters:

- hdwf – Interface handle.

- pidxWrite – Variable to receive the position of the acquisition.

The function above is used to retrieve the buffer write pointer. This is needed in ScanScreen acquisition mode to
display the scan bar.


FDwfDigitalInStatusAutoTriggered
(HDWF hdwf, BOOL *pfAuto)

Parameters:

- hdwf – Interface handle.

- pfAuto – Returns TRUE if the acquisition was auto triggered.

The function above is used to verify if the acquisition is auto triggered.


FDwfDigitalInStatusData
(HDWF hdwf,

void

*rgData,

int

countOfDataBytes)

Parameters:

- hdwf – Interface handle.

- rgData – Pointer to allocated buffer to copy the acquisition data.

- countOfDataBytes – Number of bytes to copy.

The function above is used to retrieve the acquired data samples from the instrument. It copies the data samples
to the provided buffer. The sample format is specified by FDwfDigitalInSampleFormatSetfunction.

FDwfDigitalInStatusRecord(
HDWF hdwf,

int

*pcdDataAvailable,

int

*pcdDataLost,

int

*pcdDataCorrupt)

Parameters:
-

hdwf – Interface handle.

-

pcdDataAvailable – Pointer to variable to receive the available number of samples.

-

pcdDataLost – Pointer to variable to receive the lost samples after the last check.

-

pcdDataCorrupt – Pointer to variable to receive the number of samples that could be corrupt.

The function above is used to retrieve information about the recording process. The data loss occurs when the
device acquisition is faster than the read process to PC. In this case, the device recording buffer is filled and data
samples are overwritten. Corrupt samples indicate that the samples have been overwritten by the acquisition
process during the previous read. In this case, try optimizing the loop process for faster execution or reduce the
acquisition frequency or record length to be less than or equal to the device buffer size (record length <= buffer
size/frequency).