Triggered streaming on 4227

Post general discussions on using our drivers to write your own software here
Post Reply
kurt
Newbie
Posts: 0
Joined: Fri Aug 24, 2012 12:04 am

Triggered streaming on 4227

Post by kurt »

Is it possible to use the 4227 in streaming mode in such a way that it takes a sample on every trigger? I can set the post-trigger samples to 1 and enable Auto-stop, but then I only get the results of a single trigger in the buffer (before I have to call RunStreaming again). What I'd like is to be able to do is synchronize the streaming to my external clock.

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

Re: Triggered streaming on 4227

Post by Martyn »

I am not sure that it will be easy to do what you want with PicoScope 6 software or whether you will need to write your own application using the sdk to achieve this. It will depend upon how many pre trigger samples you are looking to collect, the sample interval, and the clock rate.
Martyn
Technical Support Manager

kurt
Newbie
Posts: 0
Joined: Fri Aug 24, 2012 12:04 am

Re: Triggered streaming on 4227

Post by kurt »

I'm using the SDK, and still couldn't find a way to do it. The trigger/sample rate is about 200 kHz, and I'd like to continuously stream that data. I guess the problem I'm having is that I'm unclear about how the trigger is actually used in streaming mode. Using a slightly-modified version of the Labview example provided to me, I found that unless Auto-Stop is enabled, streaming mode will continue to collect data at the sample rate whether or not a trigger is provided. Unfortunately, the programming manual's description of streaming mode is kind of...sparse.

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

Re: Triggered streaming on 4227

Post by Martyn »

If you set the sample interval to 5usecs (200kHz) then trigger off the first pulse to sync the collection, but don't set auto stop, you will then continue to collect a sample at your required frequency of 200kHz, until you manually abort the run, and there will be no need to re trigger.
Martyn
Technical Support Manager

kurt
Newbie
Posts: 0
Joined: Fri Aug 24, 2012 12:04 am

Re: Triggered streaming on 4227

Post by kurt »

I considered that, but the problem with that is that the Picoscope's clock isn't guaranteed to be synchronized with my external clock. If the Picoscope's clock is 200 kHz and my external clock is 200.01 kHz, then the external clock will desync every ~1/(200 kHz - 200.01 kHz)=100 s. Any other suggestions?

By the way, for future version, it might be useful to add an auxiliary output that is merely the Picoscope's internal clock, for situations just like this. (I considered using the AWG to effectively do the same thing, but it's not fast enough)

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

Re: Triggered streaming on 4227

Post by Martyn »

Rapid block may be an option to capture multiple blocks to the scopes memory and then download the complete set to the PC once the collection is complete.

I haven't tested with the sdk, PicoScope6 can do up to 10000 captures subject to settings. The sdk limit would be linked to the memory of the scope, the number of samples, and the timings you chose.
Martyn
Technical Support Manager

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

Re: Triggered streaming on 4227

Post by oeway »

I am stuck in the similar situation, I hope caputures can be triggered after specific sample length is reached in stream mode.
And I also vote for external clock function, since it will be really useful in my application.

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

Re: Triggered streaming on 4227

Post by Martyn »

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

Post Reply