07-15-2008 02:38 AM
07-15-2008 03:41 AM
Your question is not clear at all.
The array functions accept all kinds of arrays in their bottom inputs, so for a 2D array the same function can sometime accept no index, one index or two. It is true that on some occasion the functions will only accept certain kinds of inputs.
My guess would be that you're trying to use Insert Into Array and it's not working for you, so here's the easy way of solving this. When you output a wire from a for loop, it builds an array by default, like this:
The other alternative is initializing the array before the loop and then passing it through the loop using shift registers and using Replace Array Subset.
07-15-2008 05:43 AM
07-15-2008 06:14 AM
07-15-2008 06:18 AM - edited 07-15-2008 06:26 AM
this is only an idea...
I don't know how to make it working
07-15-2008 06:24 AM
07-15-2008 06:26 AM
We can't see that image because it's on your hard drive.
Under the Submit Post button there is an attachment field where you can browse for a file and then it will be uploaded with your post. You don't have to embed it.
07-15-2008 07:19 AM
07-15-2008 08:08 AM
Again, the easier solution would be to just index out the number, just like I showed in my previous example, and it will automatically build a 5x4 array.
If you still want to do it this way, the key item you're missing is a shift register. When you wire the 2D array into the Replace function, you're always wiring the same data you initialized. In order to keep your data between iterations, you will need to right click the wire and replace it with a shift register.
There are two reasons your code breaks, which you can see if you enable the context help window. The first is that you're wiring a 1D array into the index input. The second is that you're providing both a row and a column index for the replace, but then you provide a 1D array and LabVIEW doesn't know which direction to use when replacing.
To fix this you can either place the replace function inside the inner loop (with a shift register on that as well) or replace at a specific row and leave the column index unwired (which will replace at column 0).
But in any case, my original suggestion is usually the better solution.
To learn more about LabVIEW, I suggest you try looking at some of these tutorials.
07-15-2008 08:12 AM