Streaming in rapid mode or multi-trigger in stream mode

Post general discussions on using our drivers to write your own software here
Post Reply
oeway
Newbie
Posts: 0
Joined: Sun Jan 05, 2014 5:01 pm

Streaming in rapid mode or multi-trigger in stream mode

Post by oeway »

I am using Picoscope 3207B with the latest SDK, everything goes well with multi-segment in rapid mode. However, during the manipulation, I can only get the data after all segments are filled, and there will be a long time to transfer all the data to the computer. So, I am wondered is there a way to transfer data simultaneously during the acquisition just like in stream mode. On the other hand, I found that stream mode cannot be triggered more than once. In other words, I want the scope record a specific length data after triggered, then waiting for the next trigger and transfer the data to the computer simultaneously.
Any suggestion?

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

Re: Streaming in rapid mode or multi-trigger in stream mode

Post by Martyn »

You should be able to do this by using MaxPreTriggerSamples, MaxPostTriggerSamples and autoStop when calling ps3000aRunStreaming
Martyn
Technical Support Manager

oeway
Newbie
Posts: 0
Joined: Sun Jan 05, 2014 5:01 pm

Re: Streaming in rapid mode or multi-trigger in stream mode

Post by oeway »

Hi Martyn,
Thank you, I will try it later.

oeway
Newbie
Posts: 0
Joined: Sun Jan 05, 2014 5:01 pm

Re: Streaming in rapid mode or multi-trigger in stream mode

Post by oeway »

Hi Martyn,

I just tried some code, but I still can't figure out how to make it work as I want.
Could you give me some details about how to set these variables to make it work. I am using the C# example code of PS3000asdk_r10_5_0_28, and I tried to modified the variables in CollectStreamingTriggered() and StreamDataHandler() functions.
Actually, I am confused about how does preTriggerSamples and postTriggerSamples work in Streaming mode, as well as trigger itself, since I saw it collecting data all the time even it not been triggered. I can see the trigger flag is set, but only once, how can I make it can be re-armed during the streaming.

Thank you very much.
Martyn wrote:You should be able to do this by using MaxPreTriggerSamples, MaxPostTriggerSamples and autoStop when calling ps3000aRunStreaming

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

Re: Streaming in rapid mode or multi-trigger in stream mode

Post by Martyn »

PreTrigger Samples is effectively saying that you need to capture this number of samples before you can look for a trigger condition.
PostTrigger Samples is used by the AutoStop mechanism to stop streaming once you have the data you require. If AutoStop is not enabled PostTrigger has no effect.

As soon as you start streaming data will be received by the driver and application, so it will collect data all the time.

It only makes sense to have one trigger per instance of streaming so, to achieve multiple buffers, you can use Post Trigger and AutoStop and when stopped, and data has been collected, just restart the loop again. If you look at our Picoscope 6 software, and set a timebase of 200ms/div or slower to put it into streaming,you have PreTrigger to left of trigger diamond, PostTrigger to the right, and it stops at end of the screen and restarts. Using triggers with streaming creates a sort of Pseudo Block Mode, where data goes directly to the PC and can be seen live.
Martyn
Technical Support Manager

Post Reply