01-23-2009 01:55 PM
Hi,
I have a small problem which i am trouble trying to figure out. Well i have 2 arrays with equal number of elements in each array. What i intend to do is to take the first element from each array and use them in a mathematical expression. Then i would like to increment the indexes of both arrays programmatically and then access the next elements from each array. This procedure is to continue till the end of the array(s). How can i do this. I have tried a couple of things but just dont seem to be able to get around the problem. Help!!!
I have attached the sample code below. I am using version LabVIEW version 8.5.1.
Thank you,
Arun
01-23-2009 02:09 PM
Feed both arrays into a for loop. Have the tunnels set for auto-indexing. Do the math. Have the tunnel going out the right hand side be set for autoindexing.
01-23-2009 02:16 PM
In general, as Ravens Fan pointed out, use autoindexing in a loop to walk through an array. However, in your specific case you can simply use the polymorphic nature of the arithmetic functions. The functions adapt to whether you wire an array or a constant, or both.
Also with respect to your specific code, it seems to me that your input array should be an array of integers, not doubles. It appears that you are expecting an array of bytes and each two bytes represent a character. Is this unicode?