08-08-2024 11:39 AM
Dear all,
I am working on data acquisition in labview using Alazar Tech ATS-SDK VIs. I am already using a producer-comsumer loop architecture by enqueuing data acquisited into the loop shown in screenshots "1" and "2" and dequeue into loop in screenshots "3" and "4" for saving into a .dat file and displaying processed data.
Initially the program can run only a few seconds before returning API buffer overflow error but I have tried pausing the display in the enqueuing loop(false case does not have anything) to decrease producer loop time and this allows the program to run up to 2 minutes, however the API buffer overflow error still occurs after that.
I am wondering is it because of the queue holding too many elements that causes computer RAM to be insufficient and limits the data transfer from DAQ buffer into labview queue. I have monitored the Memory usage on task manager and indeed the error occur when the Memory usage is about 96%.
I am trying to optimize the consumer loop to increase speed of dequeuing to avoid the fast increase in queue size, please let me know from your precious experience which part is causing the inefficiency or am I in the correct direction to deal with this.
Note: The for loop after the dequeue is to realign datas to their correct position to display because we increase the buffer size of the DAQ and one buffer contains datas from several lines.
Thank you so much!
HL
08-08-2024 04:42 PM
Looking at your screenshots leaves a lot to be desired: