10-17-2010 05:53 PM
Hi there,
i am new to Lab view and have a bit of a problem to display data.
I want to display phase versus frequency.
I want to add a new point to the graph in each iteration and want that the old datapoints are still displayed. All in all it should work like the example I attached.
But it would be nice that each time i stop the vi and start it again that the old data is not displayed anymore.
So how can i do this with the xy graph? IS there in an other way of doing it? I tried charts but i wasnt able to change the x scale to frequency.
Thanks a lot for your help.
Solved! Go to Solution.
10-17-2010 07:52 PM
If you want voltage vs. frequency, you must use an XY graph.
I can't open your VI right now, but I would bet that if you are not getting the graph to clear each time you rerun the VI, you probably have an uninitialized shift register that is maintaining its data from the last time it ran.
10-17-2010 08:23 PM
Raven's
Good guess. That is exactly the problem.
10-17-2010 10:14 PM
You have some very quiestionable code constructs that make little sense. Since you are new to LabVIEW, here are a few hints at inprovements.
10-17-2010 11:10 PM
Hi
10-17-2010 11:27 PM
Hello!
10-17-2010 11:38 PM
hi
oh there was a bit of text missing. One more try.
Thanks a lot for your comments and advices and for the fast reply.
I think its better to attach a .jpg so that you can see a part of my vi.. I wrote a few comments on it just to give an idea why i used these structures.
I tried the thing with the initialization but it wouldn't really work cause the data points get lost.
And I also tried to use the "built array' instead of the "append to array' but it came up with an error. It says that i try to connect two terminals with two different data types ( 1 D array and 2 D array). So what am i doing wrong?
Thanks a lot for your time
10-18-2010 12:44 AM
Did you look at my example?
You need to place the shift register in the outermost loop so it initializes only once. You FOR loop still makes absolutely no sense,
Alternatively, you can also use a globally initialized feedback node.
10-18-2010 04:07 PM
Hi
yes i looked at it.
Thanks a lot for your help.
Have a nice day