LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean cant be switched to off

Hello,
I want to do a continuous loop, that changes the value of valves over and over again. I want to be able to stop this loop by pressing the boolean again and switch it to off. But once my loop is running, the boolean cant be pressed anymore. 
Could you maybe help me?
Thanks so much in advance!

leololo_1-1751900303803.png

 

0 Kudos
Message 1 of 5
(136 Views)

I'm guessing that you are also very new to LabVIEW (I know you are new to the LabVIEW Forum).  Here are some suggestions to both help you in getting started with LabVIEW and in helping us to help you:

  • As you already know, LabVIEW programs are "graphical" -- in order for us to understand your code, we need to "see everything".
  • The best way for us to view your LabVIEW program is for you to attach your LabVIEW Program (or even the entire LabVIEW Project).
  • Because you are a new user, you might be using a "new" (i.e. 2025) version of LabVIEW.  Many of us are running a few versions behind, so before posting your code, consider using "Save for previous Version" (from the File menu) and choose LabVIEW 2019 or 2021.
  • Do you know how Data Flow works?  Data flows in wires.  Structures (and functions) don't start running until all the "input wires" have data.  Structures/functions don't "release" (output) data until they finish.  Structures/functions don't finish until everything inside them has run.
  • As a beginner using LabVIEW, do not use a Sequence Structure.  Especially, do not use a multi-layer Sequence Structure.  Use a Wire (or wires) instead!
  • Do you know about the "mechanical action" of Boolean controls?  Note we can't tell from a "picture" if your booleans are "Latching" or not.  Was it a "Square Button" (like "OK" or "Stop"?  If so, it won't "Stay pushed" if your code is reading it.  If it is a "Push Button", it won't stay "Pushed" (unless you "hold it down" with your finger).
  • If you are in a class, please talk to your instructor and work with your fellow students.  There are also LabVIEW tutorials (see the first page of this Forum, not to mention the Web).

Bob Schor

0 Kudos
Message 2 of 5
(98 Views)

Most likely, your event case is set to "Lock panel until the event case completes". This mean the user cannot interact with the front panel until that event case is complete, keeping you from being able to press the button.

 

Architecturally, there should never be a "long" running task inside of an event case. A basic state machine may be good enough for what you are doing.


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
0 Kudos
Message 3 of 5
(98 Views)

We don't "do" pictures of code because it is impossible to see the whole picture (sic) 😄

All we can see is a lot of "code smell" (yes, pictures can smell)

 

  • What is the mechanical action setting of the boolean control?
  • What is the event configuration?
  • What is in the other event cases?
  • What is in the sequence frames we cannot see?
  • Why is there no toplevel loop? Looks inside-out.
  • Why are there so many pointless sequence structures and local variables? 

 

so please attach your actual VI and I am willing to take a look. I won't just widely guess because there can be tons of reasons. 

0 Kudos
Message 4 of 5
(77 Views)

@crossrulz wrote:

Most likely, your event case is set to "Lock panel until the event case completes". This mean the user cannot interact with the front panel until that event case is complete, keeping you from being able to press the button.

 

Architecturally, there should never be a "long" running task inside of an event case. A basic state machine may be good enough for what you are doing.


I see the "Lock panel until the event case completes" being frequently cited as the issue.  I prefer to think of that as a symptom and not the problem.  The real problem is simply that you aren't doing it right.

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.
Message 5 of 5
(28 Views)