11 deprecated functions, Deprecated functions – Digilent WaveForms User Manual
Page 80

WaveForms™ SDK Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 80 of 85
11 Deprecated functions
The following functions are replaced by FDwfAnalogOutNode *providing access to the Amplitude and Frequency
Modulation of Analog Out channels.
FDwfAnalogOutPlayStatus(HDWF hdwf,
int
idxChannel,
int
*cdDataFree,
int
*cdDataLost,
int
*cdDataCorrupted)
Parameters:
-
hdwf – Open interface handle on a device.
-
idxChannel – Channel index.
-
cdDataFree – Pointer to variable to return the available free buffer space, the number of new samples that can
be sent.
-
cdDataLost – Pointer to variable to return the number of lost samples.
-
cdDataCorrupted – Pointer to variable to return the number of samples that could be corrupted.
The function above is used to retrieve information about the play process. The data lost occurs when the device
generator is faster than the sample send process from the PC. In this case, the device buffer gets emptied and
generated samples are repeated. Corrupt samples are a warning that the buffer might have been emptied while
samples were sent to the device. In this case, try optimizing the loop for faster execution; or reduce the frequency
or run time to be less or equal to the device buffer size (run time <= buffer size/frequency).
FDwfAnalogOutPlayData(HDWF hdwf,
int
idxChannel,
double
*rgdData,
int
cdData)
Parameters:
-
hdwf – Open interface handle on a device.
-
idxChannel – Channel index.
-
rgdData – Pointer to samples array to be sent to the device.
-
cdData – Number of samples to send.
The function above is used to sending new data samples for play mode. Before starting the Analog Out instrument,
prefill the device buffer with the first set of samples using the AnalogOutDataSet function. In the loop of sending
the following samples, first call AnalogOutStatus to read the information from the device, then
AnalogOutPlayStatus to find out how many new samples can be sent, then send the samples with
AnalogOutPlayData.
FDwfAnalogOutEnableSet(HDWF hdwf,
int
idxChannel, BOOL fEnable)
Parameters:
-
hdwf – Open interface handle on a device.
-
idxChannel – Channel index.
-
fEnable – TRUE to enable, FALSE to disable.
The function above enables or disables the channel specified by idxChannel. With channel index -1, each Analog
Out channel enable will be configured to use the same, new option.