Test and Measurement Forum

Triggered streaming on 4227

Post general discussions on using our drivers to write your own software here

Triggered streaming on 4227

Postby kurt » Mon Sep 03, 2012 7:43 pm

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.
kurt
Newbie
 
Posts: 0
Joined: Fri Aug 24, 2012 12:04 am

Re: Triggered streaming on 4227

Postby Martyn » Tue Sep 04, 2012 7:31 am

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2338
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Triggered streaming on 4227

Postby kurt » Tue Sep 04, 2012 10:51 pm

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.
kurt
Newbie
 
Posts: 0
Joined: Fri Aug 24, 2012 12:04 am

Re: Triggered streaming on 4227

Postby Martyn » Wed Sep 05, 2012 7:11 am

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2338
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Triggered streaming on 4227

Postby kurt » Wed Sep 05, 2012 1:58 pm

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)
kurt
Newbie
 
Posts: 0
Joined: Fri Aug 24, 2012 12:04 am

Re: Triggered streaming on 4227

Postby Martyn » Fri Sep 07, 2012 9:45 am

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 Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2338
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: Triggered streaming on 4227

Postby oeway » Mon Jan 06, 2014 3:58 am

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.
oeway
Newbie
 
Posts: 0
Joined: Sun Jan 05, 2014 5:01 pm

Re: Triggered streaming on 4227

Postby Martyn » Mon Jan 06, 2014 10:15 am

You should be able to do this by using MaxPreTriggerSamples and MaxPostTriggerSamples when calling ps4000RunStreaming
Martyn
Technical Specialist
Martyn
Site Admin
Site Admin
 
Posts: 2338
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots


Return to General Software Discussions

Who is online

Users browsing this forum: No registered users and 0 guests