LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to perform sweep?

Solved!
Go to solution

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

 

 

 

0 Kudos
Message 1 of 16
(5,038 Views)
Help Pls..
0 Kudos
Message 2 of 16
(5,020 Views)

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

0 Kudos
Message 3 of 16
(5,011 Views)

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

Certified LabVIEW Developer (CLD)
Certified TestStand Developer (CTD)
Using LabVIEW 8.5.1 (2008) to LabVIEW 2024
Message 4 of 16
(4,992 Views)

Hi Krisna,

Thanks for your Reply.

I was agerly waiting for someone to come up and rescue me. :smileyhappy:

 

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.:smileyhappy:

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

0 Kudos
Message 5 of 16
(4,985 Views)
Solution
Accepted by topic author LVCoder

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

Certified LabVIEW Developer (CLD)
Certified TestStand Developer (CTD)
Using LabVIEW 8.5.1 (2008) to LabVIEW 2024
Message 6 of 16
(4,976 Views)

Oops, forgot to attach.

Sorry!

Certified LabVIEW Developer (CLD)
Certified TestStand Developer (CTD)
Using LabVIEW 8.5.1 (2008) to LabVIEW 2024
0 Kudos
Message 7 of 16
(4,972 Views)

Thanks Krisna Wisnu.

Your solution works Perfect..  :smileyhappy:

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

 

0 Kudos
Message 8 of 16
(4,913 Views)

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:

 1/1.5 shrink scale

 

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

Message Edited by Krisna Wisnu on 10-06-2008 09:25 AM
Certified LabVIEW Developer (CLD)
Certified TestStand Developer (CTD)
Using LabVIEW 8.5.1 (2008) to LabVIEW 2024
Message 9 of 16
(4,893 Views)

Hey thanks Wisnu,

Works cool man.

 

I didn't try the Interpolate method yet. Will try it and get back to you if i face any problems. :smileyhappy:

 

Thanks,

Ritesh

Message 10 of 16
(4,870 Views)