LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to set boolean output high if its 5 boolean input high in proper sequence

Solved!
Go to solution

you understand i point.

when i change boolean array with button its not working. i did this because i have to put shared variable in place of these button.

Thanks,

0 Kudos
Message 11 of 20
(3,221 Views)

Use a case structure (no event structure) and poll the variable. Execute the case (containing my above inner code) whenever the boolean array differs from the previous state.

0 Kudos
Message 12 of 20
(3,213 Views)

You need to be very careful, for example your array diagram constant still has hidden elements (container size != array size), so you need to delete those. It is better to show the last unused element (see picture) to make sure).

 

Here's what I meant with the polling of the values.

 

UnlockItPolling.png

0 Kudos
Message 13 of 20
(3,210 Views)

Thanks dear

i changed little in code then its not working.

can you make it correct ?

as i am not expert in labview 😞

0 Kudos
Message 14 of 20
(3,194 Views)

Asif138 wrote:

i changed little in code then its not working.

 

Well, change it back 😄

0 Kudos
Message 15 of 20
(3,187 Views)

Well, your blue array constant has too many elements. Since you are only looking at two switches, there should only be 3 element. 

 

Your current array has an impossible transition where you need to turn one off and the other on in one step, which is not feasible. You should be able to figure out what the three values should be. *try 11,01, 00)

 

So you are trying to make so the order of the "20" switch does not matter? Why? Did the specifications change? Can you give it a more descriptive label?

 

(And please don't maximize the front panel to the screen. That's very annoying!)

Message 16 of 20
(3,185 Views)

Thank KNIGHT OF NI

You are genius! 

now its working.

Thanks again

0 Kudos
Message 17 of 20
(3,165 Views)
Solution
Accepted by Asif138

Not, it is not working. I told you that you need to check the array size. Just resizing the container does NOT change the array size. If you make the container larger, you can see that it contains four elements. You need to delete the fourth! See image.

 

Currently, if you turn one of the LEDs on and off first, you can never get the desired result. (e.g. try dock on, dock off, dock on, unlock on, 20 on. Should be unlocked but is not! Two 00 in a row can never occur again, because the array only gets updated when one changes.)

 

toomanyelements.png

Message 18 of 20
(3,158 Views)

Brilliant! it is now working as i want. but truly i dont understand its working step because i am expert of Labview. i just know very basic.

Thanks Bro  

0 Kudos
Message 19 of 20
(3,141 Views)

@Asif138 wrote:

Brilliant! it is now working as i want. but truly i dont understand its working step because i am expert of Labview. i just know very basic.

Thanks Bro  


Click on the light bulb to enable execution highlighting, then run the VI.  Besides it being really fun to watch all the dots go 'round, it is pretty good education in what happens in your LabVIEW block diagram.  Exceptions are when you need to see things happen in real time (including, but not limited to, instrument communications), or you have parallel processes going on.

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 20 of 20
(3,125 Views)