% This example uses the _runBlock_ function in order to collect a block of
% data - if other code needs to be executed while waiting for the device to
% indicate that it is ready, use the _ps4000aRunBlock_ function and poll
% the _ps4000aIsReady_ function.
% Capture a block of data:
%
% segment index: 0 (The buffer memory is not segmented in this example)
[status.runBlock] = invoke(blockGroupObj, 'runBlock', 0);
Unfortunately I don't know how to execute the function in matlab to poll it.
In your guideline for programmer the function is described very well, but unfortunately the implementation in Matlab is not explained.
isReady = 0;
[status.ps4000aRunBlock] = invoke(blockGroupObj, 'ps4000aRunBlock', 0);
% Execute some code
% Poll the Instrument Driver until the device is ready
while isReady == 0
[status, isReady] = invoke(blockGroupObj, 'ps4000aIsReady', 0);
pause(0.005);
end
thank you very much for you support.
It works fine when i don't use the status varable which is provided by the function.
The status which is provided by the isRead function is always 0, so I replaced it.