I am using an Analog Discovery 3 to acquire a short sample of data many times a second.
What I would like to achieve is to sample 1000 samples at 100 Mhz 1000 times a second ie I want to sample 1 Millions samples a second.
I am using Python and the Pydwf library.
I am achieving 300 acquisitions of 1000 samples a second and I can also achieve 300 acquisitions of 10000 samples but I cannot increase the number of acquisitions.
By measuring the time before and after different calls to the SDK using timex=time.time() I have pinpointed the problem to the call status = analogIn.status(True). It takes by itself 3 ms and it doesn't matter if the acqusition is 1000 samples or 10000 samples.
I believe analogin.status is the same as FDwfAnalogInStatus.
Is there anything I can do to improve the response time of that function call ?
Question
Carl Troili
Hi,
I am using an Analog Discovery 3 to acquire a short sample of data many times a second.
What I would like to achieve is to sample 1000 samples at 100 Mhz 1000 times a second ie I want to sample 1 Millions samples a second.
I am using Python and the Pydwf library.
I am achieving 300 acquisitions of 1000 samples a second and I can also achieve 300 acquisitions of 10000 samples but I cannot increase the number of acquisitions.
By measuring the time before and after different calls to the SDK using timex=time.time() I have pinpointed the problem to the call status = analogIn.status(True). It takes by itself 3 ms and it doesn't matter if the acqusition is 1000 samples or 10000 samples.
I believe analogin.status is the same as FDwfAnalogInStatus.
Is there anything I can do to improve the response time of that function call ?
The code is basically this https://github.com/sidneycadot/pydwf/blob/master/source/pydwf-examples/AnalogInRecordMode.py
But I have analogIn.acquisitionModeSet(DwfAcquisitionMode.Single) instead of record to control the length of the sample window.
My actual code is added below.
Regards
Carl Troili
AnalogInSingleMode.py
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now