Getting timestamp from Picoscope block

Post your MATLAB discussions here
Post Reply
uPrizZ
Newbie
Posts: 0
Joined: Fri Feb 04, 2022 11:28 am

Getting timestamp from Picoscope block

Post by uPrizZ »

Hello everyone,

I am currently writing a software that is supposed to acquire data blocks from my Picoscope 5242D as fast as possible over a period of 30 seconds. The exact timestamps of the received data blocks are really important an therefore my question is, if it is possible to set a time ref at the beginning of my measurement process and then get exact timestamps for each of my data blocks.
My current workaround consists of using the MATLAB functions 'clock' and 'etime' in my while measurement loop, so it looks something like this:

Code: Select all

currentBlockTime = 0;
t0 = clock; % timer
while (currentBlockTime <= 30) 
    [~, ~, dA, dB] = invoke(block, 'getBlockData', 0, 0, 1, 0);    
    currentBlockTime = currentBlockTime + etime(clock, t0);
    t0 = clock;

    % save block data and time in arrays
end
But I am not really sure if that is exact and efficient. I'd rather like to get the timestamp directly from the scope (as an information within the block data), if that's possible.

Thank you!

Post Reply