From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Graph chart]"build array" vs. memory

Dear all,

I used build array function to see the history of the data aquisition, whose routine runs in While loop, as time goes on.
In addition, I want to draw three different kinds of data (Double Types) in a graph chart.


As you can see in my attachment(two data case only), I used "build array" to make 2-dim. array of each data.
After running the routine during so much time, my computer was rebooted by unkown problem which suspected from the trouble in memory.
My questions are,


1. Is this method (like attachment routine) suitable to my purpose?
2. Is there another method to save the memory? At first, I want to connect the graph chart only to the build array function.
But I can't push the data to 2D array(graph chart). How to realize my first thinking?


Thank you in advance.

Lee

Message Edited by labmaster on 06-16-2005 04:03 PM

0 Kudos
Message 1 of 5
(2,398 Views)
The code image is virtually unreadable (hidden wires, huge stacks of sequences).

If these arrays grow without bounds, you need to implement a solution to prevent that. It cannot be healthy to push megabytes of data (at every single loop iteration!) to a graph that is maybe 500 pixels wide.

If you need all the data saved, stream it to disk and keep only the last few thousand points in a FIFO buffer for display.


@labmaster wrote:
2. Is there another method to save the memory? At first, I want to connect the graph chart only to the build array function.
But I can't push the data to 2D array(graph chart). How to realize my first thinking?


I don't understand what you mean by point 2. Could you explain in more detail? You only show a graph. Do you also have a chart somewhere, maybe in a different sequence frame? Attach a real example so we can understand better. 🙂
0 Kudos
Message 2 of 5
(2,374 Views)
Thanks.

Actually, I save my data sets in real time.
But, my problem is happened in viewing the data on the graph chart.
Could you let me know any examples about your answer?

Let me describe my work.
Within while loop, the program should get 3 different data sets depending on the time(each iteration).
In manual, a 2D array set should be prepared to draw multi-data sets on single graph.
But, I have only 3 data points (not array) in each iteration.
Therefore, I made three data array sets(build array) by accumulating the data(shift register).
In my program, I used three shift registers for each data set.
If I can draw the data sets to the graph (how?), I think, it will be more effective to accumulate the single graph (graph-shift register) than in the case of 3 data sets in terms of memory size.

What do you think about this?
(There are no any graph in other sequences.)


Lee

Message Edited by labmaster on 06-16-2005 05:40 PM

0 Kudos
Message 3 of 5
(2,375 Views)

@labmaster wrote:
But, I have only 3 data points (not array) in each iteration.

Bundle your three scalars into a cluster and use a waveform chart. Set the chart history lenght to a suitable value. See Image.

Message Edited by altenbach on 06-16-2005 03:44 PM

0 Kudos
Message 4 of 5
(2,369 Views)
Take a look at the recent history buffer example. Go to the example finder and search for 'buffers'.
0 Kudos
Message 5 of 5
(2,356 Views)