Jump to content
  • 0

How does the WaveForms App achieve 32k-length funcCustom wavegen?


maling

Question

In the available configurations for the Analog Discovery II, the largest buffer configuration for the AWG is 2 x 16k, which I take to mean that each channel of the AWG has its own 16k sample buffer.

However, when you use the WaveForms GUI / app, and go to Wavegen -> dropdown that says "Simple" -> select "Custom" (funcCustom) -> button that says "Import" (import signal from .WAV) -> import a .WAV file of some length, you are able to successfully import up to 32k samples and produce the signal without issue. This still works for frequencies well above those suitable for funcPlay (well into the MHz range), so I assume it is indeed playing straight from the device buffer.

I can't find any python examples (in the samples folder) which describe how this works under the hood.

  • Do you manually tell the wavegen to switch from one buffer to another?
  • Is there a way to force the device to share both channels of the buffer as a single 32k sample buffer?
  • Is there something in the .WAV (encoded as int32) that allows you to cram more samples into the 16k buffer?

Whatever the trick is, what is the trade-off of entering this mode?

  • Is the available buffer for the oscilloscopes reduced?
    • If so, would this affect the maximum frequency at which AnalogIn_Record.py could haul in data without losing samples?
  • Do the two output channels (AWG 1 and 2) become coupled together?

Thank you!

Edited by maling
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hi @maling

For AnalogDiscovery2 the custom waveform is stretch-fit to the available device buffer size, like loading 32Ki samples in 16Ki buffer only every 2nd sample will be used.
There is no option to use both AWG buffers for one channel.
In play mode the device buffer is used as fifo and samples are streamed through USB.
Under WaveForms app Device Manager various configurations can be selected with different buffer size allocations.

Link to comment
Share on other sites

  • 0

Aha, that explains a lot. So when you set a 32k wavegen signal in the funcCustom mode in the WaveForms UI, this signal stretching is also applied, and only every "N" samples are actually sent to the wavegen?

It seems counterintuitive to allow users to import a 32k length sample in the WaveForms app GUI if only a subset of 4k samples will be chosen (in configuration 0, for instance). Perhaps a warning should be displayed to alert the user that their full signal will not be used?

(Aside: It seems that the 32k sample length import is permitted regardless of which configuration the user has chosen - but no more than 32k.)

For my application, I will (for now) just use the largest output buffer available. Thank you!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...