LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xor and led problem

Hello, ik have a problem with the xor function. Normaly, when you press the "ok" button, the first led goes on, then when while loop1 is done, the second led goes on and the first goes off.

The problem is dat the first led doesn't go off. 

 

 I have attachted my project and made a print screen. 

 

Thanks for the help. 

Download All
0 Kudos
Message 1 of 4
(3,074 Views)

Hi dsqf,

 

first: renaming a BMP to PNG doesn't really convert it! There's a reason not to attach BMP and that is filesize Smiley Mad

 

second:

What is your first LED? The one called "Meting3"? It's not wired at all...

Why should a LED go off when you only set it once? You also have to set it to "false" to "switch it off"!

Best regards,
GerdW


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

Hello,

 

Can you give some more information on what you would like to do with your application?
As you didn't include the metingx.vi's, it's difficult to see what they do.

 

Just like GerdW was mentionning, you switch on the first LED, but I cannot see anywhere in your application where you switch it off.

Additionally, an XOR function only returns true at the output if only one of the two inputs is true.
So again, depending the output of metingx.vi's, the next LED's will be activated or not.  If the subVI's are retuning a '1' and you also apply a '1' by the boolean constant, the next LED will not go on.

 

So please tell us what you would like to do so we have a better understanding and are able to help you.

Best regards,
Joeri

National Instruments
Servicesg
0 Kudos
Message 3 of 4
(2,996 Views)
On a side note, for comparing two booleans "XOR" is equivalent to "!=". Using "not equal" in this case might make the code a bit easier to understand. 😉
Message 4 of 4
(2,983 Views)