Streaming mode and differentiating between channels

Post general discussions on using our drivers to write your own software here
Post Reply
jeremy
Newbie
Posts: 0
Joined: Sun Mar 23, 2014 6:49 am

Streaming mode and differentiating between channels

Post by jeremy »

Hi,

I am successfully able to use streaming mode with a single channel using my 3406D and the ps3000aStreamingReady() callback. I'm trying to add a second channel now, but I can't seem to work out how to differentiate between the samples from each channel. None of the applicable functions seem to reference which channel the data is from, just that there is data available. And the callback does not have an argument to indicate which channel has collected the data referenced by the callback, nor is there information about any data interleaving.

Is there any documentation on this? Am I just missing something obvious?

Thanks!

Hitesh

Re: Streaming mode and differentiating between channels

Post by Hitesh »

Hi jeremy,

Prior to calling the ps3000aRunStreaming function, you should register a buffer for each channel that you wish to collect data from with the driver using the ps3000aSetDataBuffer or ps3000aSetDataBuffers functions.

Once you have registered a buffer for each channel that you wish to collect data from, you should ensure that the data is copied from the buffer into a corresponding application buffer in the streaming callback function as shown in the C console application example available through the SDK.

The callback will indicate the number of samples collected for each enabled channel - it is not called in sequence for each channel. The PicoScope 3406D uses simultaneous sampling.

Which programming language are you using?

Regards,

jeremy
Newbie
Posts: 0
Joined: Sun Mar 23, 2014 6:49 am

Re: Streaming mode and differentiating between channels

Post by jeremy »

Hi Hitesh,

I eventually worked this one out, but thank you for replying.

As a suggestion, perhaps it could be added to the programming docs that (from the callback function's perspective) all channel samples will be transferred into their respective buffers exactly in tandem? I was worried that I would perhaps try to access some data which was new for CH1 but old for CH2 or vice versa. I suppose it is kind of implicit now that I think about it, but it would be nice to have it explicit.

Still loving this USB scope stuff, I am acquiring >5GB traces with no issues on linux64! Brilliant!

Hitesh

Re: Streaming mode and differentiating between channels

Post by Hitesh »

Hi jeremy,

I've passed on your suggestion for the attention of our Technical Publications team.

It is in part inferred in the description for the ps3000aStreamingReady callback function as it references the buffer that was passed to the ps3000aSetDataBuffer function.

Regards,

Post Reply