I want to develop the LabVIEW program using Picosope 5203, and realize the multiple-record function using the memory segment which the digitizer of NI or GaGe has.
Would you tell me whether the following codes are right which realizes multiple-record?
Although ps5000GetValues was used in following codes, should ps5000GetValuesAsync and ps5000DataReady be used?
Thanks in advance
Akihiro
/************************************************************
* My sample code of multiple-record part using the memory segments
***********************************************************/
/* Transfer data from PS5000 memory segments to PC memory */
for (currentSegments = 0; currentSegments < SegmentCounts;
currentSegments++)
{
/* register data buffer with driver */
ps5000SetDataBuffer(handle, channel, buffer_array[currentSegments],
sampleCount);
/* retrieve block-mode data with callback */
ps5000GetValues(handle, 0, &sampleCount,
downSampleRatio, downSampleRatioMode,
currentSegments, &overflow);
}
This would allow you to set the number of waveforms that you want to capture, then call ps5000RunBlock once. Then when the callback function indicates that all waveforms have bee taken, you have a choice how the reading he using the orginal ps5000GetValues which gets one segment at a time and allows aggregation or uses the ps5000GetValuesBulk, that allows more than one segment to be assess at a time.