LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to build a softwere circular buffer.

I have a nonbuffered analog acquisition, it is nonbuffered because I want to use the PID-control in RealTime.
The question is if it is posible to build a own circular buffer (array, 10000 rows * 23 columns) without shiftregisters and I want the sampelrate to be 10 ms?
I have tried it with whileloop and shiftregister, but it takes to much time to transport that big array, 800 ms/loop.
How to do?
0 Kudos
Message 1 of 3
(3,170 Views)
Please attach all sub VI's when attaching an example VI.

Your array is fairly large. 10,000 X 23 X 4 Bytes/SGL = 920 K. Double that value if you are using DBL's. The memory management behind this large array is probably your bottleneck -- not the shift registers.

I am attaching an example that shows how to implement a circular buffer. You will need to modify it so that it can be used with your array.

Chris_Mitchell
Product Development Engineer
Certified LabVIEW Architect

0 Kudos
Message 2 of 3
(3,170 Views)
Thank you, I will try to modify it. Cause I need to have the 10,000*23 array.
I attach my VI's.
0 Kudos
Message 3 of 3
(3,170 Views)