LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

For loop won't start or won't stop depending on the toggle switch

Solved!
Go to solution

@emart wrote:

Thanks everyone, all points taken.  We realize this is a mess, now it is time to clean it up and or start over.  Thanks again.


Good luck! This isn't too complicated of an application, so if you start from a template now that you have more knowledge about the application's functionality you should be able to mimic it pretty quick.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 11 of 12
(509 Views)

@James.M wrote:

@billko wrote:

@James.M wrote:

Alright, so like I said before the data flows left to right, so stuff on the right can't/won't do anything until the stuff on the left finishes.


I've seen you say this twice now, and it's just not true.  Data flows from the output of one node to the input of another.  Usually this means "left to right" because it's wired that way.  If you had two subVIs, "A" and "B", not wired together and "B" is to the right of "A", it does NOT follow that "A" will execute before "B".  If, for some idiotic reason, you had the outputs of "B" on the left and the inputs of "A" on the right, you could wire the outputs of "B" to "A" and the data would flow right-to-left.

 

But I'm fairly certain that I have misunderstood the information you were trying to impart?  (It wouldn't be the first time, believe me!)  🙂


 

Ah, point taken, I'll have to adjust the way I explain data flow, not just best-practices data flow. It's hard to describe data flow to a newbie without using directions. I was just trying to impart that the boolean he has wired up is supplying data to both the first case structure and the main While loop, which means they are both waiting for the info from the boolean. If he makes the application wait for the user to click the boolean, then the While loop will be waiting too.

 

I think data flow is one of the biggest problems new users seem to struggle with and this thread is an example of that. Emart can make this code work, even if it's a mess, but I think he's gotten to where the code additions have gotten out of hand to the point where he needs a little more experience/help to understand how to encorporate more functionality without messing up what's there already.


LOL, I knew you couldn't go as far as you did (CLA) believing what you said in a literal sense.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 12 of 12
(500 Views)