From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interpolating 1D XY data not working properly in my sample VI

Solved!
Go to solution

Hi Friends,

 

I need to interpolate XY data acquired from a data acquisition device, the interpolate 1D VI  just takes the nearest value instead of interpolating it, see the attached code. 

 

The 1D XY data is produced using a square of iteration (Y) and the time (t) at which the Y is obtained. The time interval is 0.2s for data generation and a 50 ms is added for the XY data interpolation. So, the raw data is

(t1, Y1), (t2, Y2), .... (tn, Yn), where Y = i*i, i is the iteration.

 

The interpolated data should be

(t1+0.05, Y1'), (t2+0.05), Y2'), .... (tn+0.05, Yn'), 

 

Currently, Yi' = Yi, which is not what I expected.

 

Could someone help with this issue?

Thanks,

Gu

Labview Document11.png

 

0 Kudos
Message 1 of 13
(2,908 Views)

Read the help for "interpolate array". Your code makes very little sense.

0 Kudos
Message 2 of 13
(2,897 Views)
Solution
Accepted by edmonton
Message 3 of 13
(2,883 Views)
Solution
Accepted by edmonton
Message 4 of 13
(2,882 Views)

Using the 2D Interpolation makes this all much easier.

—Ben
Prevent your computer from sleeping programmatically!
Use Power Requests
Download from GitHub

0 Kudos
Message 5 of 13
(2,872 Views)

How is that 2-D interpolation?

 

The VI is called "Interpolate 1D.vi".

0 Kudos
Message 6 of 13
(2,868 Views)

@Ben_Manthey wrote:

Using the 2D Interpolation makes this all much easier.


Your VI is using "interpolate 1D" though. 😉

(also, if you look inside, it is using a scary amount of code to do the same, so it is only simpler on the surface 🐵

0 Kudos
Message 7 of 13
(2,866 Views)

Hi  Dr Altenbach,

 

Thanks a lots. 

 

Gu

0 Kudos
Message 8 of 13
(2,841 Views)

Hi Ben,

 

Thank you for your response. My LV is 2015 can not open the vi, Could I trouble you to save your VI to 2014 or 2015 version and upload it again?

 

Regards,

Gu

0 Kudos
Message 9 of 13
(2,837 Views)

@edmonton wrote:

My LV is 2005 can not open the vi,


Actually, you have LabVIEW 2015. (There is no LabVIEW 2005)

0 Kudos
Message 10 of 13
(2,824 Views)