Keeping the connection ON and triggering acquisition

Post your MATLAB discussions here
Post Reply
simonbl
Newbie
Posts: 0
Joined: Tue Jun 04, 2019 2:53 pm

Keeping the connection ON and triggering acquisition

Post by simonbl »

Hi,

I am not sure how to do that but I would like to keep the connection activated with the picoscope but to start an acquisition of data ( like 2 seconds) with a trigger.
I need a robot arm to move around an hydrophone and read that value at different locations. So I would use a loop, that would trigger the acquisition, and save the data.

Thanks for the help,
Simon

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Keeping the connection ON and triggering acquisition

Post by Gerry »

Hi Simon,

Could you tell me why you want to keep the connection activated, whether you want to do this in PicoScope 6 or in the SDK API, and what your required sample rate and PicoScope Model are?

Assuming that the reason for your question is that you're concerned about missing a trigger, then if your sample rate is not too fast, and you're using the SDK, then you could stream the data and use the trigger as a marker to where you need to start and stop (i.e. 2 seconds later) copying the data to a separate buffer for analysis.

Regards,

Gerry
Gerry
Technical Specialist

PeterLang
Newbie
Posts: 0
Joined: Tue Jun 23, 2020 3:22 pm

Re: Keeping the connection ON and triggering acquisition

Post by PeterLang »

Hi Gerry,

how is it possible to use the trigger as a marker? I would like to do it in the streaming example.

Best regards

Peter Lang

Gerry
PICO STAFF
PICO STAFF
Posts: 1145
Joined: Mon Aug 11, 2014 11:14 am

Re: Keeping the connection ON and triggering acquisition

Post by Gerry »

Hi Peter,

Sorry for the delay in answering (Covid lockdown casualties).

When you use a psXXXXRunStreaming function to tell the PioScope to start streaming, you can use function arguments that (a) define how many samples there will be before the trigger, and (b) determine whether the streaming will continue until stopped by a psXXXXstop function call or until it reaches the end of the number of samples that you defined will be after the trigger point. So if you set that up correctly the value for maxPreTriggerSample, will be the offset into your Overview buffer at where the Trigger occurred.

Regards,

Gerry
Gerry
Technical Specialist

Post Reply