LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lookup Table 1D no sign

A small spelling note: the word you want is "palettes," not "pellets."

0 Kudos
Message 11 of 23
(1,174 Views)

Oh...thanks Nathand.

 

I won't repeat my mistake.Smiley Surprised

0 Kudos
Message 12 of 23
(1,157 Views)

Hi Arihant,

 

Simulation VI's can only be place within control and simulation loop, found on the same palette.

CLA | CTD
NI Alliance Partner
iLV Test Solutions Ltd
0 Kudos
Message 13 of 23
(1,147 Views)

Okay.

 

Then how am I supposed to use look up table function.

Actually I want to display a variable "y" for certain value of "x". there is no  amthematical relation between them. All I have is values of Ys for values of X.

 

Thanks.

0 Kudos
Message 14 of 23
(1,129 Views)

No need for the special lookup table function; use "Threshhold 1D Array" and "Interpolate 1D Array" as appropriate from the Array palette. For example you can use Interpolate 1D Array as shown in the image below; the only requirement is that the X values need to be unique and sorted in ascending order.

lookup.png

0 Kudos
Message 15 of 23
(1,116 Views)

Thanks Nathand. That was helpful.

 

One more query I have-What if, say there is a band of values of x for which we get a fixed "y".

x=(0,0.5),y=1.3

x=(0.6,1),y=2.3

and so on.

 

0 Kudos
Message 16 of 23
(1,102 Views)

arihant wrote:

One more query I have-What if, say there is a band of values of x for which we get a fixed "y".

x=(0,0.5),y=1.3

x=(0.6,1),y=2.3

and so on.


Just enter values for the start and end of the range, so you'll need a point at (X,Y) = (0,1.3) and (0.5, 1.3). Any X value in that range will return the same Y value because the endpoints are the same and the algorithm fits a line between them.

0 Kudos
Message 17 of 23
(1,095 Views)

If you only have two ramges, the straight line curve fit technique will work fine. If you have more than two ranges that you are comparing against, check out this recent thread. Though it doesn't sound like it from the title, they were wanting to do something very similar.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 18 of 23
(1,087 Views)

@mikeporter wrote:

If you only have two ramges, the straight line curve fit technique will work fine. If you have more than two ranges that you are comparing against, check out this recent thread. Though it doesn't sound like it from the title, they were wanting to do something very similar.


I don't understand this comment. The lookup table approach I showed will handle any number of ranges. I did mis-state one thing: the X values do not need to be unique, they just need to be sorted in ascending order. If you have three ranges, you can do this:

X     Y

0.0   1.3

0.5  1.3

0.5  2.3

1.2  2.3

1.2  4.0

2.0  4.0

0 Kudos
Message 19 of 23
(1,081 Views)

If you have three ranges, you can do this:

X     Y

0.0   1.3

0.5  1.3

0.5  2.3

1.2  2.3

1.2  4.0

2.0  4.0


Hi Nathand,

 

As per your solution, what will be the output (y) for x=0.5 (and x=1.2 for same case)?

Will it return y=1.3 or 2.3 (and 2.3 or 4.0)?

When I tried the ranges you mentioned, result was displayed for larger "y".I dont know the reason. I changed the ranges as follows and it working:

X         Y

0.0      1.3

0.5      1.3

0.6      2.3

1.0      2.3

1.1      2.9

and so on..

 

Thanks.

0 Kudos
Message 20 of 23
(1,067 Views)