• 0

How to use the full 256M sample memory with 8-bit data on the Digital Discovery


Go to solution Solved by attila,

Question

Hello,

I have a problem concerning the Digital Discovery using the Waveforms SDK.

 

I thought it is possible to use the full 256MBytes on-board recording memory for 8-bit sampling, but I am only able to read 64M samples, no matter if I use 32 bit, 16 bit or 8 bit sampling (which I configure with the function FDwfDigitalInSampleFormatSet).

The maximum size I can set via FDwfDigitalInBufferSizeSet() is 64M (i.e. 67108864), no matter what sample size I set via FDwfDigitalInSampleFormatSet(). That is, if I try to set a higher value for the buffer size, FDwfDigitalInBufferSizeGet() will still return 67108864, regardless which sample size is set (8, 16, 32).

So I thought this buffer size value is the value for 32-bit sampling, and therefore 4 times as big when using 8 bit sampling. But unfortunately, when I try to read the data via  FDwfDigitalInStatusData(), with a countOfDataBytes value that is higher than 67108864, all bytes after the 67108864 byte are zero.

I am using single aquisition mode, and start an aquisition with FDwfDigitalInConfigure(handle, true, true) and then wait until the device state becomes DONE.

 

I would be very thankful if someone could explain what I am doing wrong here. The Waveform GUI seems to be possible to do that (64M samples for 32 bit sampling, 256M samples for 8 bit sampling), so I thought it is possible with the SDK, too. Thanks.

 

Edited by Jope
Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 1
  • Solution

Hi @Jope

See the following example: DigitalIn_Acquisition_8x256M.py
The captured data looks good from first to the last byte.

>python DigitalIn_Acquisition_8x256M.py
DWF Version: b'3.11.4'
Opening first device
Generating gray counter
Configuring DigitalIn
DigitanIn base freq: 800000000.0
Sample rate: 100000000.0
Buffer size: 268435456
Waiting for acquisition...
   done
Writing to file...
   done

image.png.a7dc2efa2f6c6c6f062d442687f17965.png

image.png.84fa0f28535e05b9eeb937f46c38e875.png

Link to post
Share on other sites
  • 1

Many thanks! It works.

I made a stupid mistake. I've programmed a class in C++ for talking to the device, and in the method for setting the sample buffer size I made a sanity check against a maximum value. The max value I checked against was obtained before from calling FDwfDigitalInBufferSizeInfo(), which gives the 64M value for 32-bit sampling... So my buffer was never set higher than 64M.

Thanks again.

Link to post
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