PicoScope 7 Software
Available on Windows, Mac and Linux
Code: Select all
[status, resolution] = invoke(ps5000aDeviceObj, 'ps5000aSetDeviceResolution', 12);
Code: Select all
[status] = invoke(ps5000aDeviceObj, 'setSimpleTrigger', 0, 1000, 2, 0, 500);
Code: Select all
[status, timeIntervalNanoSeconds, maxSamples] = invoke(ps5000aDeviceObj, 'ps5000aGetTimebase', 65, 0);
Code: Select all
[status.setChB] = invoke(ps6000DeviceObj, 'ps6000SetChannel', channel, enabled, coupling, voltageRangeIndex, anaglogue offset, bandwidth);
Code: Select all
set(ps6000DeviceObj, 'timebase', timebaseIndex);
Code: Select all
set(ps6000DeviceObj, 'numPreTriggerSamples', 0);
set(ps6000DeviceObj, 'numPostTriggerSamples', 2e6);
This buffer is in the ram memory? I am asking because I don't want to write all the data to the hard drive, because its too slow.once the data is within matlab from the buffer
Code: Select all
close all;
PS5000aConfig;
ps5000aDeviceObj = icdevice('picotech_ps5000a_generic', '');
connect(ps5000aDeviceObj);
[status.setChA] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', 0, 1, 1, 8, 0.0);
[status.setChB] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', 1, 1, 1, 3, 0.0);
[status.resolution, resolution] = invoke(ps5000aDeviceObj, 'ps5000aSetDeviceResolution', 8);
[status.setSimpleTrigger] = invoke(ps5000aDeviceObj, 'setSimpleTrigger', 0, 1000, 2, 0, 1000);
[status.getTimebase2, timeIntervalNanoSeconds, maxSamples] = invoke(ps5000aDeviceObj, 'ps5000aGetTimebase2', 2, 0);
set(ps5000aDeviceObj, 'numPreTriggerSamples', 2000);
set(ps5000aDeviceObj, 'numPostTriggerSamples', 2000);
[status] = invoke(ps5000aDeviceObj, 'runBlock', 0);
[chA, chB, chC, chD, numSamples, overflow] = invoke(ps5000aDeviceObj, 'getBlockData', 0, 0, 1, 0);
[status] = invoke(ps5000aDeviceObj, 'ps5000aStop');
% Plot data values.
figure;
timeNs = double(timeIntervalNanoSeconds) * double([0:numSamples - 1]);
% Channel A
axisHandleChA = subplot(2,1,1);
plot(timeNs, chA, 'b');
title('Channel A');
xlabel(axisHandleChA, 'Time (ns)');
ylabel(axisHandleChA, 'Voltage (units?)');
% Channel B
axisHandleChB = subplot(2,1,2);
plot(timeNs, chB, 'r');
title('Channel B');
xlabel(axisHandleChB, 'Time (ns)');
ylabel(axisHandleChB, 'Voltage (units?)');
% Disconnect device object from hardware.
disconnect(ps5000aDeviceObj);
Code: Select all
%% Disconnect Device
% Disconnect device object from hardware.
disconnect(ps5000aDeviceObj);
delete(ps5000aDeviceObj);
Code: Select all
[status.setSimpleTrigger] = invoke(ps5000aDeviceObj, 'setSimpleTrigger', 0, 1000, 2, 0, 5000);
Code: Select all
[status.setChA] = invoke(ps5000aDeviceObj, 'ps5000aSetChannel', 0, 1, 1, 8, 0.0);
Code: Select all
set(ps5000aDeviceObj, 'timebase', 4);