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.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Using interpolation function in DIADEM 2017

Hello,

I would like to ask how I can realize the following function in DIADEM. I have table of data

Speed:    0 6  20  55 170 190

Distance: 3 7 13  17   50   50

Now I should interpolate that matrix, that DIADEM will recognize what speed value corresponds to Distance value within the whole range.

After that I will upload a speed-signal and DIADEM will draw distance-graph according to the table above.

0 Kudos
Message 1 of 3
(3,158 Views)

You could use ChnApprXYCalc() function to generate an approximated speed and distance channels.  Then compare the speed signal values against the approximated speed channel and determining the corresponding distance value.  In you example I used linear interpolation but you can use different settings.  I attached an example file (containing your matrix and a fake speed channel) that I used and the script I ran on that file to get the resulting distance output values.

Download All
0 Kudos
Message 2 of 3
(3,125 Views)

 Thank you very much for your reply.

0 Kudos
Message 3 of 3
(3,114 Views)