Sampling Multiple Channels Simultaneously?

Post general discussions on using our drivers to write your own software here
Post Reply
mblack
Newbie
Posts: 0
Joined: Fri Apr 06, 2018 7:05 pm

Sampling Multiple Channels Simultaneously?

Post by mblack »

Hi, what is the recommended way to sample multiple channels simultaneously using the API Functions?

I am using Python to interface with a 2408B, and am hoping to sample 3 channels simultaneously for 100us blocks @~10ns/sample in a loop of 10ms. That puts me at 10,000 samples per channel. For the sake of clarity, I am hoping to acquire 10,000 samples per channel in 100us, then wait (10ms - 100us) before sampling again.

So far I have not been able to configure any of the modes to execute fast enough to run the loop at 100Hz. I would settle for something around 20Hz, but I am thinking there must be a way to reduce the overhead required to get the data within a 10ms loop. Any advice is much appreciated. Thanks!

NeilH
PICO STAFF
PICO STAFF
Posts: 260
Joined: Tue Jul 18, 2017 8:28 am

Re: Sampling Multiple Channels Simultaneously?

Post by NeilH »

Hi

When using block mode, rapid block mode or streaming mode the scope will collect data from all active channels. So for collecting from 3 channels you would just need to set up and activate 3 of the channels before calling RunBlock or RunStreaming to get data collected from all three channels simultaneously.

How many times are you wanting to execute the loop? It may be that Rapid Block mode is more suitable for your application, than running Block mode in a loop. More information about rapid block mode can be found in the programmers guide (https://www.picotech.com/download/manua ... -guide.pdf) in section 2.7.1

Neil
Neil
Technical Support Engineer

mblack
Newbie
Posts: 0
Joined: Fri Apr 06, 2018 7:05 pm

Re: Sampling Multiple Channels Simultaneously?

Post by mblack »

Hi Neil,

Thanks for your quick reply. Ideally my loop would run indefinitely, which is why I thought streaming mode might be the way to go - but I haven't been able to get it to keep up with the loop speed (in Python). I thought it would be possible because in using the Picoscope6 software I found that the 2408B can sample continuously at high sampling rates. Do you think that the decreased performance I'm seeing could be a result of programming in Python versus C?

If I cannot achieve high sampling rates continuously (albeit only during 100us of a 10ms loop), then suppose I could settle for a ~5 second run time.

Thanks!

NeilH
PICO STAFF
PICO STAFF
Posts: 260
Joined: Tue Jul 18, 2017 8:28 am

Re: Sampling Multiple Channels Simultaneously?

Post by NeilH »

Hi

The choice of python over C shouldn't make an impact, would you be able to email your code in to support@picotech.com so that either myself or another member of the support team can have a look at it to understand what you are doing and test solutions to your problem?

Neil
Neil
Technical Support Engineer

Post Reply