05-06-2009 05:37 AM
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~
05-06-2009 06:09 AM
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?
05-06-2009 06:50 AM
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~
05-06-2009 07:06 AM
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.
05-07-2009 01:49 AM
ha, yes , I did it yesterday, connected the output back to the input , made a loop and it works. thanks for the suggestion.