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: 

Searching values array/table

Solved!
Go to solution

Hello friends, I have a.. simple problem, I´m trying to solve without sucess..At first I don´t know how I can start this..

Well, I need to create a VI and it needs to get the value of 2 PT100 resistors, and search on the following table the right value of the Relative Humidity.

Some considerations.

 

1x PT100 named "dry bulb"

1x PT100 named "wet bulb" 

 

ts ->Temp. from one of the PT100 resistor "Temp. Dry bulb resistor in ºC"

DT -> Difference of temperature between dry bulb and wet bulb in ºC

 

I know how to read the resistance of the two PT100. but I don´t Know how I can make this code, I already tried to create 2 arrays ( ts and DT) and search the nearest value from the read value. and before this, will get the indexes values XY and search on that table the right value of humidity.

 

*I had thought of using structures "for loop" but I could not put into practice;

*2 arrays (one "ts" and another for "DT").

* I have another table that I will use for this project, I found this table in google and is quite similar to that use.

 

Can anyone help me?It´s urgent.

Thanks A lot

 

02_053_02.gif

0 Kudos
Message 1 of 8
(3,438 Views)
Solution
Accepted by topic author arthur.d.duarte

Where are you stuck?

 

It sounds like you have a good approach.

 

Once you have the two indices, it is a simple matter of indexing that value out of the 2-D array.  Post the VI that you have done so far.  A For loop should not be necessary at all.

 

Something like this.

Message Edited by Ravens Fan on 02-01-2010 05:16 PM
Message 2 of 8
(3,426 Views)

Have a look at Ravens solution above. However, if you already have fractional indices, it might be more reasonable to read out the 2D array using fractional indices too.

 

You could do e.g. bilinear interpolation. Have a look at my old post here and the link in it) 

Message Edited by altenbach on 02-01-2010 02:25 PM
0 Kudos
Message 3 of 8
(3,417 Views)

You can also use a table control.

 

Ben

 

 

Find Table Element.png

0 Kudos
Message 4 of 8
(3,398 Views)

Just found out the table ref does not work in the snippet (don't know why) so you will have to create a new ref from the table terminal.

Ben

0 Kudos
Message 5 of 8
(3,396 Views)

Thank you friends. the first solution might be the simplest. So Today I´ll try doing that.

Tomorrow I return here and post the result.

Thankyou very much my friends!

0 Kudos
Message 6 of 8
(3,363 Views)

Hello guys, How are you doing?

 

The solution posted by "Ravens" was fine, I am attaching the file with the solution implemented.
Thank you very much!

0 Kudos
Message 7 of 8
(3,328 Views)
I'm doing well.  I'm glad to hear you liked my solution and it is working for you.  Please mark my message as the solution to your question rather than your own.  You can go to the options menu to the upper right of your message first to unmark it as the solution.
0 Kudos
Message 8 of 8
(3,309 Views)