10-17-2011 10:41 AM
Hi C3-C4....
Are you wanting to save your data past what's showing on the graph? If not, you can use a waveform chart instead of a waveform graph. The waveform graph takes in arrays and then plots all the points at once. The waveform chart takes values and stores them in a buffer. Then once this buffer is full, it rewrites over the points. This knowledgebase article explains more of the differences between the two graphs.
Waveform graphs only take arrays of data, not single points. It then plots this data all at once. This makes that a bit more complicated if you still would like to use a graph and keep the previous data. We do have an example on our development zone. This example can be found here. This keeps using a waveform chart, but the chart will display as a sliding window. We can accomplish the sliding window using property nodes.
Hope this helps!
10-17-2011 11:47 PM
hi thank you for the reply...
I am spliting my data coming from serial into 2 (1D) arrays that is why I am using waveform graph..
I have tried to implement that example but as I am beginner so it is difficult for me...
colud you please explain that example ... or tell me another possible alternate..
Cant I achive this by only updating my x axis..
In the other software I was updating my x axis by applying if-else loop that if data exceeds from n value then change the x axis lim and so on...
Please help......!
10-18-2011 01:24 PM
Hi C3-C4,
The only options I can really think of would be to use a waveform chart, use the example, or just plot all of your data and when you're done plotting it, you can change the x axis to just see the data that you would like to see.
In reguards to the example, what specific parts can I explain? In the upper left of the example, it builds the waveform. the random number generator is the actual data that it is going to plot, so when you go to impliment this in your code, you would put whatever data you need plotted at this point. then it uses the get date/time in seconds VI to do a subtraction. The waveform graph property node is set to xscale offset. The subtraction of the current time from time the VI was started. This sets the initial part of the x-axis to be at this point.
Please let me know how else I can help, and I hope this helps!
10-19-2011 10:14 AM
hi lea D
Thanks for your time..
I am using waveform Chart and it works best for my task..
But the problem is that , now I have to use filter ..
And filter requires signal in array form and for filtered signal out I must use Waveform graph because waveform chart does not accept array..
Is there way to achieve this by using property node of wave form graph to change the xlim so that data will not compressed on same window.?
10-20-2011 02:07 PM
Hi C3-C4,
Not a problem. I see the filter and your issue in the .jpegs you uploaded. Have you tried using an index array? You could use an index array to feed in the array and the index of the iteration number. This would give you one value and you could feed this value into the waveform chart. If you were going to be doing this for efficiency, I would recommend moving the two arrays going into your filter outside of the loop and putting the index array inside of the loop. This way it has only loaded the array in once instead of every single time checking that array for any changes you might of made.
Just out of curiousity, how long are you going to be running this for? Is there a particular reason you need the view to show a particular window? The easiest solution for this would be to just change the window after the program is running.
Hope this helps more!
10-27-2011 01:33 PM
@ Lea D
thank you friend.. 🙂
Now I am using index array block and it is working with waveform chart but I think it slows the response time of filtered data..