Start streaming with SimpleTrigger on Ext Channel - PicoScope5444D

Post your MATLAB discussions here
Post Reply
PiotrK
Newbie
Posts: 0
Joined: Wed Sep 13, 2023 8:21 am

Start streaming with SimpleTrigger on Ext Channel - PicoScope5444D

Post by PiotrK »

My goal is to start streaming mode using SimpleTrigger (e.g. 2V on rising edge) for the EXT channel. I modified the Matlab example file (https://tinyurl.com/5s4rearf) as follows:

Code: Select all

% Set the |autoTriggerMs| property in order to automatically trigger the
% oscilloscope after 1 second if a trigger event has not occurred. Set to 0
% to wait indefinitely for a trigger event.

set(triggerGroupObj, 'autoTriggerMs', 0);

% Channel     : 0 (ps5000aEnuminfo.enPS5000AChannel.PS5000A_CHANNEL_A)
% Threshold   : 500 mV
% Direction   : 2 (ps5000aEnuminfo.enPS5000AThresholdDirection.PS5000A_RISING)

[status.setSimpleTrigger] = invoke(triggerGroupObj, 'setSimpleTrigger', 4, 2000, 2);
If I understand the comments correctly, the code modified in this way will start collecting data only when a rising signal with an amplitude greater than 2V appears at the EXT input. However, this script currently starts collecting data as soon as it is run. The Matlab command window contains, among others, the following information:
"Turning off trigger...
Trigger turned off."
I don't know if this is the default information before changing the settings before the script, or maybe the problem is that this script does not actually run SimpleTrigger? If so, should any additional command be added?

Thank you in advance for your quick help and response.

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

Re: Start streaming with SimpleTrigger on Ext Channel - PicoScope5444D

Post by Martyn »

When you use streaming mode the device will start streaming data to the application immediately . What triggering does in streaming is provide an indication at which sample in the streamed data the trigger condition is met. If you are not interested in the data before the trigger event then you need to discard this data until you see the TriggeredAt flag.
Martyn
Technical Support Manager

PiotrK
Newbie
Posts: 0
Joined: Wed Sep 13, 2023 8:21 am

Re: Start streaming with SimpleTrigger on Ext Channel - PicoScope5444D

Post by PiotrK »

Thank you! :D This seemingly simple solution allowed me to quasi-synchronize two PicoScope oscilloscopes for streaming operation.

Post Reply