LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how i can stop while loop with number completely?

Solved!
Go to solution

hi

i want to stop while loop in specific condition. it is a part of my project.

for example i want to stop while loop after the i is 12. i can do it but the problem is that while start again from 0 after the i is 12. i want campletely stop it after the i=12 that i never change

i  attach a pic to clear.

thank you so much.

0 Kudos
Message 1 of 15
(3,733 Views)
The while loop will stop and will not start again until you press the run button unless you are doing something very silly such as using the run continuous mode.
0 Kudos
Message 2 of 15
(3,722 Views)

hi my dear Dennis_Knutson

thank you so much for your help i dont understand that run continuously is reason.

i hope dont repeat this silly workSmiley Very Happy

thank you for your answer

0 Kudos
Message 3 of 15
(3,714 Views)
Run continuous is for special debug use only. It is the same thing as repeatedly clicking the run button so of course the VI will run again and again.
0 Kudos
Message 4 of 15
(3,703 Views)

Oh,  I think the OP wants to SAVE the twelve in a shift register.  Like this:

!0.png

 

Of course there is no way to make a while loop iterate 0 times so we would need a for loop and a feedback node set to "initiallize on compile or load" like thus.

!0.png


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 15
(3,695 Views)

but a question remain that if i want while loop stop but want to chek some other function with control number

 

What should I do

0 Kudos
Message 6 of 15
(3,694 Views)

@hamedi wrote:

but a question remain that if i want while loop stop but want to chek some other function with control number


You need to be much more specific. What is "other function"? What is "check"? Is the "check" part of the termination condition or should it occur after the loop stops? Where does the "control number" come from?


hamedi wrote:

What should I do


Use LabVIEW.

0 Kudos
Message 7 of 15
(3,682 Views)
If you want to use the last value, simply pass it out of the loop. If you want to use each value, then why don't you have it inside the loop.

You are releasing information in small chunks. Take some time to think about what you really want to do and then fully explain it.
0 Kudos
Message 8 of 15
(3,680 Views)

dear Dennis_Knutson  and other friends

 

my is problem that want to use each value in while loop, and fill a matrix with them.

i want to creat a 128*128 matrix that each element of it is depended to i and j.

and after the matrix is full i want to use it.

but i can't do this.

 

i attached my project.

thank you for help

 

Download All
0 Kudos
Message 9 of 15
(3,628 Views)

Use a FOR loop inside of a FOR loop.  Use autoindexing to build the 2D array.


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
Message 10 of 15
(3,614 Views)