LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why won't my LED switch on

Solved!
Go to solution

Hi all

 

Pls see my attached VI. Need your help. Why won't my LED

switch on in the false case structure condition?

 

Thanks!

 

The cat.

0 Kudos
Message 1 of 5
(2,964 Views)
Your code is inside out.  Your case structure should be inside your while loop.  You need to have your boolean set before you start running your code because the boolean switch only gets read once at the very beginning of the program.  Because you have two separate while loops, you created separate stop buttons which are confusing as to which you should press to stop the program.
Message 2 of 5
(2,962 Views)

Hi Ravens fan

 

I did as what you told me to do. The LED that is outside the case structure and while loop still

won't work but when I add a LED inside the case structure and while loop it works.

Why is this so? Is there anything I can add to make the LED outside the case structure and while

loop to turn on?

0 Kudos
Message 3 of 5
(2,943 Views)
Solution
Accepted by topic author The cat

Hi cat,

 

to make booleans work you have to put them in the while loop... It's called dataflow and you can watch it in execution highlight mode Smiley Wink

 

You also have abused express vis (well, now I learned there's a "Relais" function!). Some boolean logic will be enough and also illustrates the irrelevance of your wiring as:

1) not(FALSE)==TRUE

2) x AND TRUE == x

 

Please read the manual, attend the (free) online courses (to be found in the academics section of the website) and look at the examples that come with LabView...

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,926 Views)

Hey GerdW

 

Thanks! That's exactly what I wanted!

Ravens Fan, thanks for your help too!

Cheers!

0 Kudos
Message 5 of 5
(2,922 Views)