Jump to content

Question

Hi,
I'm using Analog Discovery 2 to perform data acquisition through the two channels of the Oscilloscope, using the AnalogIn_Record.py code available in the SDK as a base.

I want to configure Oscilloscope channels with 2x16k buffers. And this way I want to get the Scope (2 x 16k) and Wavegen (2 x 1k) configuration, presented in the second line of the Waveforms Device Manager. By default the configuration is the one shown in the first line, Scope (2 x 8k) and Wavegen (2 x 4k).

Studying the Waveforms SDK Reference Manual: the function FDwfAnalogOutDataInfo ( HDWF hdwf, int idxChannel, int *pnSamplesMin, double *pnSamplesMax) gives me the maximum buffer size information at 4096 samples for the output channels.

The function FDwfAnalogInBufferSizeInfo (HDWF hdwf, int *pnSizeMin, int *pnSizeMax) tells me the maximum buffer size at 8192 samples for the Oscilloscope's input channels.

The function  FDwfAnalogInBufferSizeSet (HDWF hdwf, int nSize) should set the buffer size of the device's analog inputs. However, the function is ineffective, as any buffer value passed through this function is ignored and the device's default buffer size is used as the maximum buffer size.

The function FDwfAnalogOutDataSet (HDWF hdwf, int idxChannel, double *rgdData, int cdData) should set the device's prefill buffer. However, the function is ineffective, as any buffer value passed through this function is ignored and the device's default size is used.

How to properly configure device buffer sizes using the Python API? I want to configure Oscilloscope channels with 2x16k buffers. And this way I want to get the Scope (2 x 16k) and Wavegen (2 x 1k) configuration?

Thanks in advance for your help.

DeviceManager.JPG

Edited by Tamires
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thank you, Attila.
The FDwfDeviceConfigOpen function is just what I need.

Where can I find the manual like the one in the image? Because the manual I have access to is different.
Where he talks specifically about Analog Discovery 2 is on page 122 (13.3 Analog Discovery 2) and it has 132 pages in total, unlike the image that has 137 pages.
I've updated the WaveForms and SDK at this point to see if the WaveForms SDK Reference Manual has had any changes, but it's the same as what I had before.

paginamanual.png

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...