Trigger setting for Rapid block mode

Post your MATLAB discussions here
Post Reply
Sairy
Newbie
Posts: 0
Joined: Mon Dec 28, 2020 10:08 am

Trigger setting for Rapid block mode

Post by Sairy »

Hi,
I would like to know about the trigger settings for PicoScope in MATLAB.

As shown in this timing chart, I want to acquire voltage data 65536 times for each falling edge of the Trig signal, starting from the measurement data at the first falling edge of the Trig signal after the falling edge of the State signal.

In Rapid block mode, it is possible to acquire data at precise timing by monitoring the Trig Signal, but in this case, there is no State information, so the starting point of data is random.

Could you please tell me how to set the trigger setting so that the data sampled with the falling edge of the Trig signal after falling the State signal is always the beginning of the 65536 samples?

Image

Regards,

Sairy
Newbie
Posts: 0
Joined: Mon Dec 28, 2020 10:08 am

Re: Trigger setting for Rapid block mode

Post by Sairy »

Hi,
I have created a UML diagram of the PicoScope behavior I want to achieve.

Image

Thank you for your help.

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

Re: Trigger setting for Rapid block mode

Post by Martyn »

For the acquire voltage data in the rapid block loop how many data samples do you need?
Martyn
Technical Support Manager

Sairy
Newbie
Posts: 0
Joined: Mon Dec 28, 2020 10:08 am

Re: Trigger setting for Rapid block mode

Post by Sairy »

Hi Martyn,
The number of samples is up to 65536 samples.
Normally we will acquire 16384 samples.
As shown in the code below, I would like to repeat the acquisition of data starting after the falling edge of the State signal more than 1000 times.

Code: Select all

numCaptures = 65536;
...
for n = 1:1000
	[status.runBlock, timeIndisposedMs] = invoke(blockGroupObj, 'runBlock', 0);
	[numSamples, overflow, chA(:,1:numCaptures,n), chB(:,1:numCaptures,n)] = invoke(rapidBlockGroupObj, 'getRapidBlockData', numCaptures, downsamplingRatio, downsamplingRatioMode);
end
Regards,

Post Reply