LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

False constant wired to Continue if True

Solved!
Go to solution

This may be a question that has a painfully simple answer, but I can't seem to make heads or tails out if it.  What is the value of writing a VI that contains a while loop that uses the Continue if True terminal and then wiring a False constant to it.  I have seen this in several places in both NI example code and in some of their function VI's, most recently where I am using the PID functions.  If the loop is guaranteed to iterate only once, then why use the loop structure at all?  My feeling is that it is use for VI memory allocation or creating references to a VI that is expected to run more than once in the calling VI, but that is as far as I can guess about the value of this type of programming architecture.

 

Thanks

Eric

0 Kudos
Message 1 of 6
(3,649 Views)

Because the values stored in unitialized shift register.

 

For example  look here: Basic Functional Global Variable Example

 

Andrey.

 

Message 2 of 6
(3,642 Views)

Eric,

 

this is a special architecture for VIs to contain data. This architecture has several names:

Functional Global Variable

Lab-2-style Variable

Action Engine

 

You can find lots of information on this if looking around on ni.com and even in this forum.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 6
(3,641 Views)
Solution
Accepted by Gravy_Train
There is a nice description in the LabVIEW wiki entry Functional Global variable
Message 4 of 6
(3,624 Views)

I would never wire a false constant to Continue if True.

 

(I always wire a true constant to Stop if True! Smiley Very Happy )

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 5 of 6
(3,576 Views)

> I would never wire a false constant to Continue if True.

> I always wire a true constant to Stop if True!

 

It depends from the optimistic or pessimistic principle...

 

"...To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the architect, the glass is not big enough..."

🙂

 

Andrey. 

 

0 Kudos
Message 6 of 6
(3,571 Views)