LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

update graph

Solved!
Go to solution

attached is a sample labview code of the problem i'm having. i need my XY graph to update at each point but you can see  that it would only update after the first for loop is done. I'm aware that the XY graph can be put inside the inner for loop but then that would only show the portion of the entire graph. any help is appreciated! thanks in advance!

 

(it seems the image gets truncated when i try posting. please look at the attached VI.)

update_graph.png

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

Well, don't initilize the inner shift register with every iteration of the outer loop, but tap into the outer shift register. Here's a quick example (LV10):

 

 

Message 2 of 6
(2,698 Views)

What are you actually trying to do? Do you have a flow chart or algorithm expaining what should be in the output arrays and graph?

 

Using Build Array inside a loop is generally not a good idea as it can cause frequent memory reallocations and a big performance hit, if not crashes when the arrays get large.

 

I suspect that this can be done in one loop.

 

Lynn

0 Kudos
Message 3 of 6
(2,697 Views)

well i basically have to scan a motor in three different sections and all of them at different speeds. please let me know if there is a more efficient way. i will look into the previous post. thanks in advance!

0 Kudos
Message 4 of 6
(2,693 Views)

altenbach,

 

thanks this is exactly what i need! thanks for your help.

this method works for now and perhaps there can be a more efficient method

0 Kudos
Message 5 of 6
(2,691 Views)

@sdkpark wrote:

altenbach,

 

thanks this is exactly what i need! thanks for your help.

this method works for now and perhaps there can be a more efficient method


not likely!

 

Altenbach has a history of providing the most effecient solutions-

Spoiler
I'm not even going to look-  I've been embarassed that way beforeSmiley Very Happy

 


"Should be" isn't "Is" -Jay
Message 6 of 6
(2,675 Views)