Jump to content
  • 0

Divergent sample count for digital and analog acquisition using python SDK – Analog Discovery 2


Tamires

Question

Hey.

I'm using Analog Discovery 2 to perform data acquisition through the two Oscilloscope channels and the 16 digital channels, using the AnalogIn_Record1.py and DigitalIn_Sync.py codes available in the SDK as a base.
When executing the code most of the time I correctly get the number of samples I want according to the sampling rate and time, being the same for both digital and analog channels.
In the code, I check the acquisition status and the program only exits the acquisition when the status of both (analog and digital) is completed.
However, there are cases in which the acquisition is terminated, but there is a divergence between the number of samples obtained for analog and digital reading.

Is this the correct and expected behavior? How should I go about solving this problem?

Thanks for the help.


For the tests I used the default acquisition configuration.

image.png.318fa96b011a9ab6db30944690dbf99f.png

As well as configuration 8.

image.png.52976edb82d7cd924204006ba21d5c27.png

Below are some results:

 

For the first setup:

1)

cSamples Analog: 2000000 | cSamples Digital: 1967193

NO LOST ANALOG SAMPLES!

Corrupted Analogs: 2210

NO LOST DIGITAL SAMPLES!

Corrupted Digital: 4559

 

2)

cSamples Analog: 12000000 | cSamples Digital: 11999912

NO LOST ANALOG SAMPLES!

NOT CORRUPT ANALOG SAMPLES!

NO LOST DIGITAL SAMPLES!

NOT CORRUPT DIGITAL SAMPLES!

 

3)

cSamples Analog: 18000000| cSamples Digital: 18000000

NO LOST ANALOG SAMPLES!

NOT CORRUPT ANALOG SAMPLES!

NO LOST DIGITAL SAMPLES!

NOT CORRUPT DIGITAL SAMPLES!

 

4)

cSamples Analog : 17991808 | cSamples Digital : 17987713
NO LOST ANALOG SAMPLES!
Corrupted Analogs: 1074
NO LOST DIGITAL SAMPLES!
NOT CORRUPT DIGITAL SAMPLES!

 

5)

cSamples Analog : 17991808 | cSamples Digital : 17991809

NO LOST ANALOG SAMPLES!

Corrupted Analogs: 120

NO LOST DIGITAL SAMPLES!

NOT CORRUPT DIGITAL SAMPLES!

 

6)

cSamples Analog : 35901696 | cSamples Digital : 35897601

NO LOST ANALOG SAMPLES!

Corrupted Analogs: 10187

NO LOST DIGITAL SAMPLES!

NOT CORRUPT DIGITAL SAMPLES!

 

For configuration 8:

1)

cSamples Analog : 36000000 | cSamples Digital : 36000000

NO LOST ANALOG SAMPLES!

NOT CORRUPT ANALOG SAMPLES!

NO LOST DIGITAL SAMPLES!

NOT CORRUPT DIGITAL SAMPLES!

 

 

2)

cSamples Analog : 4000000| cSamples Digital : 3999984

NO LOST ANALOG SAMPLES!

NOT CORRUPT ANALOG SAMPLES!

NO LOST DIGITAL SAMPLES!

NOT CORRUPT DIGITAL SAMPLES!

 

 

3)

cSamples Analog : 71860736 | cSamples Digital : 72000000

NO LOST ANALOG SAMPLES!

NOT CORRUPT ANALOG SAMPLES!

NO LOST DIGITAL SAMPLES!

NOT CORRUPT DIGITAL SAMPLES!

 

4)

cSamples  Analog : 36000000 | cSamples Digital : 36000000
NO LOST ANALOG SAMPLES!
NOT CORRUPT ANALOG SAMPLES!
NO LOST DIGITAL SAMPLES!
Corrupted Digital : 500

 

5)

cSamples  Analog : 71860736 | cSamples  Digital : 72000000
NO LOST ANALOG SAMPLES!
NOT CORRUPT ANALOG SAMPLES!
NO LOST DIGITAL SAMPLES!
NOT CORRUPT DIGITAL SAMPLES!

 

6)

cSamples  Analog : 71967232 | cSamples  Digital : 72000000
NO LOST ANALOG SAMPLES!
NOT CORRUPT ANALOG SAMPLES!
NO LOST DIGITAL SAMPLES!
NOT CORRUPT DIGITAL SAMPLES!

 

7)

cSamples  Analog : 71983616 | cSamples  Digital : 72000000
NO LOST ANALOG SAMPLES!
NOT CORRUPT ANALOG SAMPLES!
NO LOST DIGITAL SAMPLES!
Corrupted Digital : 660

 

8)

cSamples  Analog: 3967232 | cSamples Digital: 4000000
NO LOST ANALOG SAMPLES!
Corrupted Analogs: 9166
NO LOST DIGITAL SAMPLES!
Corrupted Digital : 9716

Link to comment
Share on other sites

1 answer 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...