PicoScope 7 Software
Available on Windows, Mac and Linux
Searching for devices...
5V power supply not connected.
Do you want to run using USB only Y/N?
Powering the unit via USB
Handle: 1. Device opened successfully.
MCTunit.resolution =4
MCTunit.maxADCValue =32767
Collect streaming...
Data is written to disk file (stream.txt)
Press a key to start
Streaming Data continually at Time Interval = 48 (ns)
Streaming data...Press a key to stop
index = 1
Collected 2080768 samples, start index in buffer= 0, Total: 2080768 samples
index = 2
Collected 2565 samples, start index in buffer= 2080768, Total: 2083333 samples
index = 3
Collected 2080767 samples, start index in buffer= 0, Total: 4164100 samples
index = 4
Collected 2566 samples, start index in buffer= 2080767, Total: 4166666 samples
index = 5
Collected 2080766 samples, start index in buffer= 0, Total: 6247432 samples
index = 6
Collected 2567 samples, start index in buffer= 2080766, Total: 6249999 samples
index = 7
Collected 2080765 samples, start index in buffer= 0, Total: 8330764 samples
index = 8
Collected 2568 samples, start index in buffer= 2080765, Total: 8333332 samples
index = 9
Collected 2080764 samples, start index in buffer= 0, Total: 10414096 samples
index = 10
Collected 2569 samples, start index in buffer= 2080764, Total: 10416665 samples
index = 11
Collected 2080763 samples, start index in buffer= 0, Total: 12497428 samples
index = 12
Collected 2570 samples, start index in buffer= 2080763, Total: 12499998 samples
index = 13
Collected 2080762 samples, start index in buffer= 0, Total: 14580760 samples
index = 14
Collected 2571 samples, start index in buffer= 2080762, Total: 14583331 samples
index = 15
Collected 2080761 samples, start index in buffer= 0, Total: 16664092 samples
index = 16
Collected 2572 samples, start index in buffer= 2080761, Total: 16666664 samples
Time elapsed = 16807 (ms)
Total samples collected = 16666664
Streaming Rate = 9.916501e+05 (Samples/sec)
Data collection aborted
Exit.
Code: Select all
int64_t time_start_ms, time_stop_ms;
int64_t time_test1_ms, time_test2_ms;
time_start_ms = exx_get_time_ms();
while (!_kbhit() && !g_autoStopped)
{
/* Poll until data is received. Until then, GetStreamingLatestValues wont call the callback */
Sleep(1000);
g_ready = FALSE;
status = ps5000aGetStreamingLatestValues(unit->handle, CallBackStreaming, &bufferInfo);
index ++;
printf("\nindex = %d\n", index);
if (g_ready && g_sampleCount > 0) /* can be ready and have no data, if autoStop has fired */
{
totalSamples += g_sampleCount;
printf("Collected %3li samples, start index in buffer= %5lu, Total: %6d samples ", g_sampleCount, g_startIndex, totalSamples);
}
}
time_stop_ms = exx_get_time_ms();
printf("\nTime elapsed = %d (ms)\n", time_stop_ms - time_start_ms);
printf("Total samples collected = %d\n", totalSamples);
printf("Streaming Rate = %e (Samples/sec)\n", 1000.0*totalSamples/(time_stop_ms-time_start_ms));