LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview

Hello,

 

             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

Thank you

0 Kudos
Message 1 of 10
(2,103 Views)

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.

0 Kudos
Message 2 of 10
(2,101 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 10
(2,100 Views)

They always say a picture is worth 1000 words, so see the image below:

 

 

 

 

To learn more about LabVIEW, I suggest you try looking at some of these tutorials.

0 Kudos
Message 4 of 10
(2,099 Views)

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.

0 Kudos
Message 5 of 10
(2,091 Views)

hi,

          I have implemented as u suggested but after terminating the loop the array was empty it didnt get updated

0 Kudos
Message 6 of 10
(2,086 Views)

Hi,

            I have implemented as you suggested but I didnt get the updated array afer terminating the loop

0 Kudos
Message 7 of 10
(2,083 Views)

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?

0 Kudos
Message 8 of 10
(2,082 Views)

Vikaspeddanagiredy wrote:

          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)

0 Kudos
Message 9 of 10
(2,070 Views)

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).

0 Kudos
Message 10 of 10
(2,067 Views)