09-18-2009 03:32 AM
Hi there Labview community!
I'm trying to make a particular chart where i can choose after let's say 1 minute of incrementing X-t0 values to delete with a decrementing X-t0 its corresponding y value.
Here comes the problem:
when i try to switch from incremental to decremental the chart clear all the lines (and the history), and not just the X-t0 value sent to him.
I've tried to work with the history (deleting the last lines) but when you set it to 500000 points or more (i need a long history), reading, deleting and writing takes too much time and the chart slow down.
I believe i didn't explain my problem very well so if you have any question or any suggestion about it, feel free to help me 🙂
Thanks in advance,
Ierman Gert
09-18-2009 03:53 AM
Hi Ierman,
I think this is what you want.
09-18-2009 04:52 AM
Thanks a lot gak for your reply, i really appreciated it.
I've tried to test your code (with 1ms delay) and it works as i wanted to, until the size of the y array goes to 100k point, after that it slow down too much.
Any idea for make it faster?
Ierman Gert
09-18-2009 06:20 AM
How many points do you want to plot?
09-18-2009 06:50 AM
Same program works fine for me for more than 100k points.Still if you want to improve speed then try this vi. Put the no of points you want to store in dimension size input of "Initialize array" in the Vi attached below. I have put 10 lacs, so it should run at same speed for 10 lacs points atleast.Tell me if it works for u or not.
Best of luck
09-18-2009 08:43 AM
Thanks for the new vi, i've tried it with 1 mil points in the initialize array, no time delay and it works really fast, there is just one little problem 🙂 .
When i try to activate the decrement button (i've set the boolean button at switch when pressed since i need a continuous time decrement) it doesn't work the chart just stop itself without x-axis deleting or anything.
I've tried to avoid this problem but without luck; i should initialize an array also for the timestamp or something like that ?
Ierman Gert
09-18-2009 11:31 PM
Problem is solved dude.
09-19-2009 03:32 AM
Thanks for all the time you are spending for fixing my problem and sorry for bother you again 🙂
the last version you made works great, the only problem is that sending a large array to the chart slow down it when the subset array is larger than 50k points and i need to acquire more or less 2k samples / second till 500k points or more.
The 2nd version was really fast, if only you could insert a decrement time in that one it would be perfect. I've tried to work on it (the 2nd),and i wonder why, if i try to decrement the t0 while sending a nan (or 0 or whatever Y) che chart clear itself and its history? Isn't there an option or something like that for not let it clear itself ?
Thanks again..
Iermant Gert
09-21-2009 04:20 AM
Hi Lerman,
I tried the code and, even adding a 0 to the array when decrementing time, I cannot see the reset of the chart.
Actually you see the history emptying because, after a while, you see data before t0 and, in my opinion, that's expected behaviour.
Maybe it seems to you it's just clearing because you get back to t0 very fast.
In order to verify what I am saying you could try just increasing the wait time.
With best regards,
Lucius
09-24-2009 06:21 AM
Hi Ierman,
Have you solved your problem? I was busy, so din't reply.