09-04-2005 08:03 AM
|
i want to store some elements programatically in to array.i used build array function and also tried with insert in array function.I am attaching my vi i am expecting that at loop termination the array should contain multiple of 5 but it always contain zero. any suggestion. thanks |
09-04-2005 08:28 AM
Your VI wasn't attached, but usually with arrays and loops there are 2 common modes of operations - wiring something out of the loop and auto indexing it so it is built into an array or initializing the array before the loop and using Replace Array Subset with a shift register to replace elements in the array.
Usually, the only reason to use resizing operations (Build Array, Delete from Array, etc.) inside a loop is if you have to analyze data inside the loop and use only some of the data and you don't know the array size in advance. In this case too you need to use a shift register to pass the array from one loop iteration to the next.
As for what you say, that you always get zero (an empty array?), this is often caused by auto indexing 2 different arrays into the loop. The number of times the loop will run is determined by the smallest number, so if you auto-indexed an empty array into a for loop, the for loop will run 0 times, and the array coming out of it will be empty.
09-04-2005 09:14 AM
09-04-2005 09:18 AM
|
i am again attaching my VI hope this time it will attached. |
09-04-2005 09:22 AM
|
i am atrying to attached my vi evry time time i browse it form my PC and then click submist post button but it is not attaching i dis send attached file but today it is not working:) |
09-04-2005 10:12 AM
Actually, the VI was attached to all of your posts, but some for some reason there is no link to it.
Here is the VI. I can't open it because it's 7.1.
09-04-2005 10:43 AM
|
i am anow sending the vi in form of png file.check it. |
09-04-2005 11:35 AM
09-04-2005 11:35 AM
09-04-2005 11:41 AM