PicoScope 7 Software
Available on Windows, Mac and Linux
However, I am not quite sure if it is possible to implement this using the Matlab interface. As a first step, I simply tried to set up two streamingGroupObj with different downsampling ratios, but this seems to be the wrong way.You can collect data from the PicoScope 4000 driver with a different downsampling factor when ps4000aRunBlock or ps4000aRunStreaming has already been called and has successfully captured all the data.
Code: Select all
for (i = 0; i < unit->channelCount; i++)
{
if ((i >= DUAL_SCOPE && unit->channelCount == QUAD_SCOPE && powerStatus == PICO_POWER_SUPPLY_NOT_CONNECTED) || !rawData[i])
{
// No need to set the channels C and D if Quad channel scope and power supply not connected.
// No need to set the channels if no raw data is needed.
unit->channelSettings[i].enabled = FALSE;
}
else
{
buffers2[i * 2] = (int16_t*)calloc(preTrigger + postTrigger, sizeof(int16_t));
buffers2[i * 2 + 1] = (int16_t*)calloc(preTrigger + postTrigger, sizeof(int16_t));
status = ps5000aSetDataBuffers(unit->handle, (PS5000A_CHANNEL)i, buffers2[i * 2], buffers2[i * 2 + 1], preTrigger + postTrigger, 0, PS5000A_RATIO_MODE_NONE);
appBuffers2[i * 2] = (int16_t*)calloc(preTrigger + postTrigger, sizeof(int16_t));
appBuffers2[i * 2 + 1] = (int16_t*)calloc(preTrigger + postTrigger, sizeof(int16_t));
printf(status ? "StreamDataHandler:ps5000aSetDataBuffers(channel %ld) ------ 0x%08lx \n" : "", i, status);
}
}
Code: Select all
status = ps5000aGetValuesAsync(unit->handle, 0, preTrigger + postTrigger, 1, PS5000A_RATIO_MODE_NONE, 0, callBackStreaming, &bufferInfo2);