Decaying DC Offset during first block capture - 5244B C++

Post general discussions on using our drivers to write your own software here
Post Reply
jaray
Newbie
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Decaying DC Offset during first block capture - 5244B C++

Post by jaray »

I designed my software around the C example for capturing a block of data. Everything works except the first block of data I capture always starts with a slight positive DC offset that decays as the record continues. The scope channel is set for AC coupling. The major difference between my code and the example is that I have an arm button and a start button that. When arm is pressed, the program mostly follows the example up until ps5000aRunBlock is called. It is called once the start button has pressed, the data is collected and saved to a CSV file. If the PicoScope remains connected and I rerun the program the DC offset is no longer present. I tried letting the picoscope sit in "arm" mode for several minutes before I started the data collection and the result was the same. Before this configuration, I had the setup and capture done just like the example, yet the results were the same. My signal is coming from an analog devices AD5932 DDS set up for 1000 Hz.

I've included a plot showing the 1st and 2nd captures.
Attachments
Both.png

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Decaying DC Offset during first block capture - 5244B C+

Post by Martyn »

Is it possible for you to send in your code to support@picotech.com so that we can take a look at the exact calling sequence. It seems as if the AC coupling is not being applied until the RunBlock is issued but, once applied, remains until the scope is power cycled.
Martyn
Technical Support Manager

jaray
Newbie
Posts: 0
Joined: Wed Jan 14, 2015 8:47 pm

Re: Decaying DC Offset during first block capture - 5244B C+

Post by jaray »

Sure, I will do it now.

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Decaying DC Offset during first block capture - 5244B C+

Post by Martyn »

We have received the code and will take a look. Thank you for the detailed program flow, it will help.
Martyn
Technical Support Manager

Post Reply