callback function execution timing

Post general discussions on using our drivers to write your own software here
Post Reply
Posts: 0
Joined: Mon Aug 07, 2023 8:40 pm callback function execution timing

Post by wei123 »


I have a question regarding the PicoSDK example python code for data streaming, ( ...

In line 169, the ps.ps3000aGetStreamingLatestValues function is used. This function contains a callback function (streaming_callback in line 151), which transfers data from the temporary buffer (bufferAMax) to the long complete buffer (bufferCompleteA) every time when 250 data points are ready. I found out about this by saving bufferCompleteA every time the streaming_callback function was executed (code attached).

Now my question is how to initiate the data transfer from temporary buffer to complete buffer only after the whole temporary buffer is filled? For example, I have a temporary buffer of 50M data points, and I would like to wait until all 50M data points (instead of every 250 data points) are collected before starting the data transfer. The purpose of this is that when numBuffersToCapture >1, the code can process and save the already-collected data when the scope is collecting the next block of data.

Any insights will be appreciated. Thank you in advance!
(8.39 KiB) Downloaded 74 times

Post Reply