• 0
shabbirahmed

Forwarding raw waveform data to C/C++ code?

Question

Hi all, 

I am new to AD2 so this might be a trivial question. 

I have a project where i want to extract raw waveform data from AD2 and feed it to my program which is C/C++ and do my own processing on it. I need this to happen live when i am connected to the signal. As far as i have seen it is possible to save a captured signal as image or values statically but i need to to happen live. 

Is it possible to so this?

Thanks in advance, 

Shabbir

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

@jpeyron

Thank you for the quick response!

I was going through some of the specs for the ADC sample rate and saw that it is still going to use USB 2.0 to talk to my laptop. How will i be able to do the advertised sample rate of 100MS/s if my bottle neck is the USB 2.0?

Thanks, 

Shabbir

Edited by shabbirahmed

Share this post


Link to post
Share on other sites
  • 0

Hi @shabbirahmed,

Unfortunately certain features are limited as stated in the reference manual. Streaming is one of those features. In the Waveforms reference manual under oscilloscope in section 2 control it states:  Stream: allows capturing large number of samples at lower rates. In this mode, the samples are streamed through the USB limiting the rate (depending on the system and other connected devices) at about 1M samples/sec. 

thank you,

Jon

 

Edited by jpeyron

Share this post


Link to post
Share on other sites
  • 0
2 hours ago, jpeyron said:

Hi @shabbirahmed,

Unfortunately certain features are limited as stated in the reference manual. Streaming is one of those features. In the Waveforms reference manual under oscilloscope in section 2 control it states:  Stream: allows capturing large number of samples at lower rates. In this mode, the samples are streamed through the USB limiting the rate (depending on the system and other connected devices) at about 1M samples/sec. 

thank you,

Jon

 

@jpeyron

So if i were to say do some processing on a 10MHz signal with >20MHz triggered sampling and then spit out the results to the laptop will i be able to get up to the these sampling speeds? My priority is the sampling and processing of the signals, not so much the streaming, so even if i am able to process the signal when i see one on the line and then just retrieve the data to my laptop i am good.

 

Thanks,

Shabbir

Share this post


Link to post
Share on other sites
  • 0

 Hi @shabbirahmed,

I believe the AD2 can handle the 10MHz signal with >20MHz triggered sampling with the Discovery BNC adapter. @attila is that accurate?  I would look here at the Analog Discovery 2 Specifications for specific specs for the AD2. After you have acquired the data you want you can export the file to do further processing. 

cheers,

Jon

Edited by jpeyron

Share this post


Link to post
Share on other sites
  • 0
28 minutes ago, jpeyron said:

After you have acquired the data you want you can export the file to do further processing.

@jpeyron Is it possible to Stream this data back to the laptop instead of saving it to a file and then exporting it? That will save me a lot of time that i can use for processing.

 

Thanks,

Shabbir

Edited by shabbirahmed

Share this post


Link to post
Share on other sites
  • 0
On 3/28/2017 at 3:04 PM, jpeyron said:

Hi @shabbirahmed,

You can do this using the Waveforms SDK. here is the Waveforms SDK reference manual. Hereherehere  and here are a few threads that deals with Waveforms SDK. Also here is the Waveforms 2015 reference manual.

cheers,

Jon

Hi,

 

I am trying to do the same thing with my digital discovery. Found the code in /usr/share/digilent/waveforms/sample/c  but trying g++ digitalout_binarycounter.cpp gives me an undefined reference to all your api's. Do I need to install anything other that waveforms2015 and adept2 ?

 

John Eaton

 

 

Share this post


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