LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D Array

Hi there,
I'm using a 2D Array as a buffer. How can i grant that there won't happen a
buffer overflow??
0 Kudos
Message 1 of 3
(2,778 Views)
By making sure the buffer is initialized to a size that never can be filled..., make it automatically resize if it is close to full, or synchronize whatever reads the buffer with the function that fills it by using a que e.g....

A circular buffer is a good solution, you can have overflow in such a buffer as well, but then the consequence is only that you loose the data you did not read out before they got overwritten...

Circular buffer examples can be found on NI zone, here is one:

http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3ECB156A4E034080020E74861&p_node=DZ52026&p_submitted=N&p_rank=&p_answer=&p_source=External
Message 2 of 3
(2,778 Views)
hmm, the circular buffer sounds good, but i need my programm not to loose
the data. or i need a signal if i loose data.
so i guess i have to take the solution with the resizing. but is it possible
to resize a buffer during realtime processing?
thanks at all
"Mads" schrieb im Newsbeitrag
news:506500000005000000E8DF0000-1042324653000@exchange.ni.com...
> By making sure the buffer is initialized to a size that never can be
> filled..., make it automatically resize if it is close to full, or
> synchronize whatever reads the buffer with the function that fills it
> by using a que e.g....
>
> A circular buffer is a good solution, you can have overflow in such a
> buffer as well, but then the consequence is only that you loose the
> data you did not r
ead out before they got overwritten...
>
> Circular buffer examples can be found on NI zone, here is one:
>
>
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3ECB
156A4E034080020E74861&p_node=DZ52026&p_submitted=N&p_rank=&p_answer=&p_sourc
e=External
0 Kudos
Message 3 of 3
(2,778 Views)