LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the value when the filler is not giving the exact value

Solved!
Go to solution

Hi,

 

          I don't know whether the heading given is correct or not!! What I need is that in the following program, I'm getting the values from the flow array. But if I'm giving a value through the filler which is not in the array, I need to find the efficiency for which I have got the equation. (i.e; if the flow value from filler is 85 and if we have 80 & 100 in the array, the efficiency which we find should be in between the efficiency value of those two values). How can I do that? Also, I'm not getting the efficiency when 356 is entered instead of 356.0258!! Any helps would be highly appreciated.

0 Kudos
Message 1 of 16
(3,066 Views)

Hi niks,

 

unfortunately you didn't provide that CSV file needed to run your VI (nor did you use AutoCleanup).

 

Have you ever tried the Interpolate1DArray function or its companion Threshold1DArray? I guess that's what you need:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 16
(3,049 Views)

You have already asked and got solution

0 Kudos
Message 3 of 16
(3,046 Views)

Hi,

 

      Sorry for not sending the CSV file. Please find the attached CSV file. I haven't tried using the interpolate function till now and I know that I've to use that only. But I'm not familiar with using that function. I'm trying to do the same. Any helps will be appreciated.

0 Kudos
Message 4 of 16
(3,045 Views)

hi,

 

     That one was using string function. This one was using the normal one. that's why I got confused. Anyway thanks. But again one doubt, whether we can use this interpolation function in case of arrays which are not sorted?

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

Hi niks,

 

whether we can use this interpolation function in case of arrays which are not sorted?

No. Read the LabVIEW help for that function to avoid any doubts!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 16
(3,040 Views)

Hi,

 

      That's exactly my problem. Here the array cannot be sorted since it contains data from different times. So I cannot sort it. Is there any other way that I can approach this problem? 

0 Kudos
Message 7 of 16
(3,036 Views)

Hi niks,

 

what is "slider" meant to be in your VI?

When you need to interpolate between two samples you should apply a (linear) interpolation between them. Simple as that!

Use the integer part from "slider" to select two samples, then use the fractional part of "slider" to interpolate between those two samples…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 16
(3,020 Views)

Hi,

 

      The slider is for entering the input value for flow. According to the change in flow, I need to get the same value from Flow in the table which is the database. And if the value from the slider is not there in the database, then the efficiency value should be a value almost the same as the efficiency values of the corresponding flow values. I hope the question is clear. I can't sort the flow table.

0 Kudos
Message 9 of 16
(3,017 Views)

First f all you need to understand the algorithm. For example, you have values ...15, 16,.....14.5, 16,.... And incoming value 15.1 Which of interval you will interpolate? 15-16 or 14.5-16?

0 Kudos
Message 10 of 16
(3,015 Views)