LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

allocate space while updating graph

Solved!
Go to solution

hey all,

 

i was just wondering if there is a way to update graph while allocating space for the array so it will be more efficient computing.

the method i always used was build array in a while/for loop and a build array that concatenates and have a graph attached inside the loop. it seems to be slugging my the computer because it takes a long time for labview to open any other programs afterwards.

 

my question is, is there a way to allocate space AND have the graph update every time? i know i can initialize an array and replace elements in the array, but then my graph is padded with zeros. any help is appreciated. thanks in advance!

0 Kudos
Message 1 of 3
(2,371 Views)
Solution
Accepted by topic author sdkpark

If you initialize your array with NaN instead of 0 you won't have visible padding in your graph.

 

You might also want to look to see if a Chart fits your needs better than a Graph.  Charts have built in buffers and display the x most recent values.  You can change the buffer size.


--Using LV8.2, 8.6, 2009, 2012--
Message 2 of 3
(2,366 Views)

wow thank you very much. i didn't know you can allocate with NaN. works perfectly, thank you!

0 Kudos
Message 3 of 3
(2,353 Views)