LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop structures

Chaos,

Your pictured solution is incomplete because you need two instances of the termination boolean determination, another one inside the loop. Currently, the comparison operation is done exactly once and never again, thus the loop will stop no matter what (it is inside the TRUE case!) and can be deleted entirely. Think dataflow!

The termination condition must be checked at the beginning AND at each loop iteration.

My solution places the termination condition inside the loop and thus only one instance is required. I think it is a cleaner solution.

Message Edited by altenbach on 05-19-2005 11:31 AM

0 Kudos
Message 11 of 16
(1,560 Views)
Good point, it was just something I threw it together in 20 seconds and didnt think it through. Hmm, I get the nagging feeling (I dont know why) that this should be easier and I am missing an obvious solution...
0 Kudos
Message 12 of 16
(1,548 Views)
There isn't a while-do structure (yet) but something you can do to automate your task of creating them (until NI makes them native) is to make a template design of your loop and case structures. Adding the template to your function palette will let you merge the code into your VI and you won't have to setup everything just the way you want it every time, only once.
0 Kudos
Message 13 of 16
(1,548 Views)
These are good questions for which I don't have an answer at the moment.

But as already mentioned I'd prefer such a loop (one may think I'm a lazy guy - it may be right ;)).
I filled a feedback from as suggested by Philip.
Maybe it's a good input which will be available in future versions - otherwise I'll come back to your solution altenbach :)).

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 14 of 16
(1,688 Views)

@altenbach wrote:

(If the need really exists, I am sure that the wizards at NI will come up with a stunningly beautiful and intuitive new loop structure that does exactly what you want. :))


We are flattered!

...but remember that we build our new products guided by feedback from you guys; our valued customers.

Kudo's to becktho for submitting the suggestion!

Message Edited by Philip C. on 05-20-2005 07:07 PM

- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 15 of 16
(1,509 Views)
Becktho is right, this would be useful,

Using LV for a while, I complete forgot about this possibility, and just coded around it.

Well spotted,

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 16 of 16
(1,489 Views)