10-03-2008 08:44 AM
Dear all,
I am working on an application where i am recieving data at 5 ms/Division and i am plotting it on Waveform Graph with X-Scale 0-100.
Now, i want to show tha same data at 10 ms/D. i.e the whole data will be shown on 50 points now.
PS: i dont want to change the scale of the Graph. X-Scale of the Graph will still be 0-100 .
How can i do it in LV?
Thanks,
Ritesh
Solved! Go to Solution.
10-03-2008 12:52 PM
10-03-2008 02:51 PM
Hey Guys,
I think i could do it with the Help of Interpolation. But have no idea how to do it ?
Waiting for Inputs..
Thanks,
Ritesh
10-04-2008 06:42 AM
Hi ritesh024,
I am not sure I am understanding your question as I am not familiar with your problems, but let me ask you these questions to give me a clearer picture:
1. What do you mean by "5ms/division"? Does it mean that you received the data every 5ms?
2. When you want to change the into "10ms/division", you want to change the display only right? if Yes, you would not need to interpolate the data as it would change the size of the data you have.
3. Also refer to the 2nd question, what trigger the change from "5ms/division" to "10ms/division"? from Front Panel initiated by the user? or programmatically after certain time or code have performed?
It would be nice if you gave me your VI to give a clearer picture.
Krisna Wisnu
10-04-2008 07:02 AM
Hi Krisna,
Thanks for your Reply.
I was agerly waiting for someone to come up and rescue me.
But after playing around around with the Interpolation function for 2 days, i finally found the solution.
Though it was not difficult to crack, but i haven't played around with mathematical functions much so was completely relying on you guys.
I am attaching the VI to this message just incase any one wants to have a look at it. And yes, let me know if there's a better way to perform this function.
Thanks,
Ritesh
10-04-2008 08:11 AM
Hi Ritesh,
Glad that you have found your solution.
I just take a look at your VI, and came up with another solution for you. I use Decimate 1D Array to select specific sample of the data. The difference between this solution and yours is that, in your VI, actually you changed the data by using Interpolate function. Meanwhile by using Decimate 1D Array, we only select smaller sample of the data without changing the data (only change the size of the data).
We usually use interpolate to predict a value in the middle of two values.
Hope that helps!
Sincerely,
Krisna Wisnu
10-04-2008 08:25 AM
Oops, forgot to attach.
Sorry!
10-06-2008 06:53 AM
Thanks Krisna Wisnu.
But in Using the Decimate Function, i can only have integer values, is it ?
Like i can only shrik the values to 1/2 or 1/3 and so on, and not 1/1.5 ?
Like now i was shrinking the data on the graph. if i want to expand the data (plotting 50 points on 100 points ), do i need to interpolate it ??
Thanks,
Ritesh
10-06-2008 09:21 AM - edited 10-06-2008 09:25 AM
Hi Ritesh,
Glad I can be a help.
1. Actually you can have 1/1.5 signal. But it will be a little bit tricky. 1/1.5 is equal to 2/3 right? Hence, we can split the signals into three, Interleave the two/three signals, and append zero in the one/three signal in the end. The diagram below explains better:
2. Yes, if you have 50 data points, and you want to have it in 100 points, then it is appropriate to use Interpolate. Spread the 50 data points into 100 data points, the empty data points you interpolate it (predict the data between two values).
Hope it helps!
Sincerely,
Krisna Wisnu
10-07-2008 02:00 AM