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
Highlighted

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
(265 Views)

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


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 2 of 13
(254 Views)
Solution
Accepted by topic author edmonton

Try this....

 

 


LabVIEW Champion. It all comes together in GCentral GCentral
Message 3 of 13
(240 Views)
Solution
Accepted by topic author edmonton

interpol8.png


LabVIEW Champion. It all comes together in GCentral GCentral
Message 4 of 13
(239 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
(229 Views)

How is that 2-D interpolation?

 

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

0 Kudos
Message 6 of 13
(225 Views)

@Ben_Manthey wrote:

Using the 2D Interpolation makes this all much easier.


Your VI is using "interpolate 1D" though. Smiley Wink

(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 Smiley Surprised)


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 7 of 13
(223 Views)

Hi  Dr Altenbach,

 

Thanks a lots. 

 

Gu

0 Kudos
Message 8 of 13
(198 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
(194 Views)

@edmonton wrote:

My LV is 2005 can not open the vi,


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


LabVIEW Champion. It all comes together in GCentral GCentral
0 Kudos
Message 10 of 13
(181 Views)