Hello,
I tried to use your c++ data streaming example from github for PicoScope 4444. It seems that there is some problem with taking and not releasing memory. I have tried to perform long-term data streaming but the program gradually fulfilled entire available memory. I think that it should not work like that since the API guidance claims that those buffers are FIFO types of memory. Even the allocation functions are called only once.
I am not able to find the reason why it consumes so much memory. Let's say that my settings are as follows:
Hi Hitesh,
I have performed the experiment: 4 channels enabled, sampling interval 100 ns (10MS/s) for 100 seconds.
In the beginning, the application took about 4MB, and at the end of the measurement, it was about 6,5GB.
Is there a way how to read raw data collected by the driver? Since the data are already in memory, it would be way effective to perform the measurement first and save it to the file afterwards.
In this example, there is the continuous saving of data to the file during the measurement, which slows the application. My computer allows me to save to the binary file only two channels at the rate of 10MS/s in real time (SSD). Higher sampling rate or more than two channels will not be in real time. Without the saving to the file, I can run the application up to 100MS/s, but I don't know how to address the collected data in the driver's memory.
You can use the ps4000aGetValuesAsync() function to retrieve the data from the driver post-capture so you don't have to write to file while collecting data as the example does.
The function above can use the same streaming callback as you would with the ps4000aGetStreamingLatestValues() - you just need to setup the buffers to be large enough to write the data into.