LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart problem (increment - decrement time)

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

 

 

0 Kudos
Message 1 of 11
(4,538 Views)

Hi Ierman,

 

I think this is what you want.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 2 of 11
(4,533 Views)

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

 

 

 

0 Kudos
Message 3 of 11
(4,521 Views)

How many points do you want to plot?

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 4 of 11
(4,507 Views)

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

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
Message 5 of 11
(4,500 Views)

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

0 Kudos
Message 6 of 11
(4,490 Views)

Problem is solved dude.Smiley Wink

 

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 7 of 11
(4,460 Views)

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

0 Kudos
Message 8 of 11
(4,450 Views)

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

0 Kudos
Message 9 of 11
(4,405 Views)

Hi Ierman,

 

Have you solved your problem? I was busy, so din't reply.

Gaurav k
CLD Certified !!!!!
Do not forget to Mark solution and to give Kudo if problem is solved.
0 Kudos
Message 10 of 11
(4,359 Views)