1 control, Control – Digilent WaveForms User Manual
Page 36
![background image](/manuals/672895/36/background.png)
WaveForms™ SDK Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 36 of 85
6.1 Control
FDwfAnalogOutReset(HDWF hdwf,
int
idxChannel)
Parameters:
-
hdwf – Interface handle.
-
idxChannel – Channel index.
The function above resets and configures (by default, having auto configure enabled) all AnalogOut instrument
parameters to default values for the specified channel. To reset instrument parameters across all channels, set
idxChannel to -1.
FDwfAnalogOutConfigure(HDWF hdwf,
int
idxChannel, BOOL fStart)
Parameters:
-
hdwf – Interface handle.
-
idxChannel – Channel index.
-
fStart – Start the instrument. To stop, set to FALSE.
The function above is used to start or stop the instrument. With channel index -1, each enabled Analog Out
channel will be configured.
FDwfAnalogOutStatus(HDWF hdwf,
int
idxChannel, DwfState *psts)
Parameters:
-
hdwf – Open interface handle on a device.
-
idxChannel – Channel index.
-
psts – Pointer to variable to return the state.
The function above is used to check the state of the instrument.
FDwfAnalogOutNodePlayStatus(HDWF hdwf,
int
idxChannel, AnalogOutNode node,
int
*cdDataFree,
int
*cdDataLost,
int
*cdDataCorrupted)
Parameters:
-
hdwf – Open interface handle on a device.
-
idxChannel – Channel index.
-
node – Node 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).