Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

lookup table

hey, I'm stuck on making my loopuptable work.

 

here is the requirement

 

I have a constant 2d array table, as following:

1 1001

2 1002

3 1003

4 1004

.

.

.

29 1029

 

the input is dynamic :for example

2

4

9

 

and I expect the output is

1002

1004

1009

 

I tried several methods but still didnt get success, if there anybody here can give me a help in how to deal with it? maybe an example vi ?very appreciated

cheers~

0 Kudos
Message 1 of 5
(3,284 Views)

 From your description, it's not a 2D array at all. It's a 1D array. All you need is the Index Array function and make sure the Index input is an integer.

 

Why did you post this to the Digital I/O board?

0 Kudos
Message 2 of 5
(3,282 Views)

sorry; I think I didnt see this is the Digital I/O board. however, thanks for reply, but the input is an array.

2 4 9, or others like this, it changes everytime. I cant find a way to get the output array~:( looking for help~

0 Kudos
Message 3 of 5
(3,278 Views)

I really don't understand what the problem is. What do you mean the input is an array? Is this what you want to use as an index? If so, simply place the Index Array function inside a for loop. Wire the array through the for loop and you will get an array out.

 

It would be wise to post an image or the actual code you have if you continue to have problems.

0 Kudos
Message 4 of 5
(3,275 Views)

ha, yes , I did it yesterday, connected  the output back to the input , made a loop and it works. thanks for the suggestion.

0 Kudos
Message 5 of 5
(3,254 Views)