Capture data without triggering
Capture data without triggering
I want to capture data in block mode without causing a trigger. I thought the following code should work, but it does not. The ps4000aGetValues() returns error code 25hex, PICO_NO_SAMPLES_AVAILABLE. Why?
sts = ps4000aStop(mConfig.device); // stop any previous capture
sts = ps4000aRunBlock(mConfig.device, // begin new capture
mConfig.preTrigSampleCnt, // 2K
mConfig.postTrigSampleCnt, // 6K
mConfig.timeBase, // 39
&mConfig.timeIndisposedMs, // 0
mConfig.segmentIndex, // 1
mConfig.lpReady, // NULL
mConfig.cbParameter); // NULL
usleep(10000); // allow some time to get all new data capture
sts = ps4000aStop(mConfig.device);
sts = ps4000aGetValues(mConfig.device,
startIndex, // 0
&noOfSamples, // 4 * 8192
1, // down sample ratio N/A
PS4000A_RATIO_MODE_NONE, // ignore down sampling
mConfig.segmentIndex, // 0
&overflow); // N/A