LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph can't update for new measurements although it's placed in the same while loop as the data source???

Hi every one
I've red the help topics in lV, and also the discussion in here and it all seems to be  right, but its not working with my graph.
I have placed a data source and a graph in the same while loop but some how, after i counted!,  the graph shifts first 8-9 points back and then plots the data. Thats not normal.  If I run a chart the problem does not appear. I checked the data source, and it spits only one data measurement in every iteration in the while loop as it may. 
The question is then , why the Graph shift about 8-9 point backward and then plots the data to the end of the graph boarder again, instead of updating for each measurement
i thought that somehow the graph got a proberty that can handle that??
any suggestions!
Zamzam 
HFZ
0 Kudos
Message 1 of 5
(2,360 Views)
Your diagram is peppered with property nodes acting on the axes, so if you are not happy with the scaling you need to feed more reasonable values to these nodes.
 
Apart from that, I don't understand your question very well. Maybe you can attach the VI?
 
Are you confused by the difference between charts and graphs? They are very fundamentally different. Graphs only plot the current data while charts have an internal chart history where the new data gets appended.
0 Kudos
Message 2 of 5
(2,358 Views)
Its simple,
I got a while loop and for each iteration, there is one new datavalue ready to be plotted on the graph. now The graph ,like I understand it, should take this new value and plot it at its most right side on its display (that means the graph display is full of plotted data and a new value is attached to it).
The problem with my graph is that it dont do that. It does something else, and that is : The graph display shift a few datapoints back in the x-axe and then begins updating (displaying) the values on the graph display, one at a time, until the datacurve hits the right most boarder of the graphdisplay . Then new data comes (2-3 values of measuremts) but they are not beeing plotted (the graph are freezing ) and then it happens again ... the graph shifts back and so on...
Hope u understand what i mean. My VI is verry  big and got a lot of subs, so it is difficult for me to attache it to you!
 
Zamzam 
HFZ
0 Kudos
Message 3 of 5
(2,352 Views)
Without seeing the real code, it is hard to tell, but it seems you have a race condition between the property nodes and the graph and chart terminals. Since LabVIEW executes fully parallel if there is no data depency between nodes, you cannot tell if the property nodes execute before or after the graph is updated with new data. At the beginning, you probably read out the chart axis before any data has arrived on the chart terminal.
 
I see that you read the chart X-axis via a property node, then feed this to the graph x-axis via another property node. Place these property nodes inside a flat sequence frame, the create data depency to make sure they execute AFTER the graph and chart terminals are updated with new data.

Message Edited by altenbach on 05-04-2006 07:47 AM

0 Kudos
Message 4 of 5
(2,346 Views)
Hi AltenB.
Thanks for response! It seem like a good solution, but it didn't help , as you can see in the block diagram,  i implementet the flat sequence structure, after what I understud from your suggestion.
 
Now I'll try to but the chart and the graphs under another flat sequence and see if it helps.! What do u think, 
I thought, that meaby, the while loop is so big now, that it cant handle the timing between all instructions.  could it be the problem, what do u think?
Zamzam
HFZ
0 Kudos
Message 5 of 5
(2,327 Views)