LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop if true or continue if true?

It might be a simple question, and I'm just curious.
 
There is a STOP button and it can be activated with two conditions: Stop if true and Continue if true.
Say, I want to exit a loop. To make this happen, I can do either "STOP -> Stop if true" or "STOP -> NOT -> Continue if true".
I see most of time "STOP -> NOT -> Continue if true" even though it adds one more step "NOT" function.
Is there any reason or just programmer prefers?
 
Thanks
 
0 Kudos
Message 1 of 4
(5,560 Views)
Hello:

The selection of "Stop if true" of "Continue if true" depends on the stop condition you will use. For example you may need to keep running a cycle while a digital input is on, so you need to continue if true, or in the other hand you may need to stop when an command is received through a button, so you need to stop if true. It depends on your needs.

In the case you mention, I think it's just a programmer preference.



Robst - CLD

Using LabVIEW since version 7.0


Message 2 of 4
(5,557 Views)
Don't quote me on this, but I would think it's a carryover from hardware conventions/visualization.  You'll also see hardware guys go crazy with XOR, NOR, and NAND gates.
Message 3 of 4
(5,549 Views)
Actually, in older versions of Labview (I think before 6.0), there was no Stop sign, only the continue sign.  Continue while true was the only condition for a while loop.  If you wanted to stop on a true signal, you would have to negate the signal then wire it to the continue icon.  I guess enough people complained and NI introduced the Stop sign.  It was made into a choice for backwards compatibility.  Older programs converted to 6.0 could still use the continue feature, while new programs had to option to stop on true.
- tbob

Inventor of the WORM Global
Message 4 of 4
(5,543 Views)