In labview I have used a while loop. I performed some operations inside the loop. And the result is changing continuously inside the loop when i run . I want to take all these changing results and put it in an array when the loop is terminated. Can you please suggest how to implement this. Please reply as soon as possible
I'll try to reply as soon as possible...
You should be able to accomplish what you need by bringing the result wire to the right of the While Loop and connect it to an array indicator, in 2 steps:
1. bring the wire to the edge of the While Loop which will automatically create a tunnel.
2. Right-click on the tunnel and select "tunnel mode > indexing"
You will now have an array.
Wire the outputs to a the While loop to create a tunnel. Right-click on the tunnel and select to autoindex. The output of the tunnel will now be an array of the values.
This is such a basic question that you should probably repeat some of the basic LabVIEW tutorials first.
How fast does the loop run? Overall, this seems like a bad architecture, because the final array size is not deterministic. In fact you could easily run out of memory if you forget to stop the loop. (even if you have many jigobytes!). What determines the stopping of the loop?
Maybe you can take a step back and explain to us what you really want to do, maybe show us some code. Most likely we can suggest a much better solution.
Christian, That's why I included this: To learn more about LabVIEW, I suggest you try looking at some of these tutorials. 😉
You will need to provide the code that you have. There is no way we can guess why you do not have any values, as it could be due to many reasons. You really need to do some tutorials and learn the very most basic aspects of LabVIEW, otherwise you will waste more time asking questions and not understanding what we are trying to say.
I would guess this is the first time you use LabVIEW, right?
I have implemented as u suggested but after terminating the loop the array was empty it didnt get updated
You really need to show us your code.
How did you "terminate" the loop? (e.g. you need to wire the desired condition to the stop terminal of the loop, don't use the stop function)
Altenbach is correct, if you clicked on the red stop sign (called Abort Execution), the loop will not complete; thus not place any values into the array. You must provide a logic reason for the loop to stop or have a Stop Button to complete the execution of the Loop (meaning that the values will populate the array elements).