LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling two boolean buttons

Are the numbers of your controls significant? I see that you have 1234569 and 10.

 

Is this a vi that you want to execute once and leave and then execute again and leave?

Tim
GHSP
0 Kudos
Message 11 of 22
(714 Views)

Hey Tim,

 

What you did wiorks for sites #1 &2 the behaviour is the same for 3&4, 5-10 are one for one, so

 

if 1=on then 1&2 turn on

if 2=on then 1&2 turn on

if 1=off both 1&2 are off

if 2=off both 1&2 are off

exact same for 3&4

 

if 5=on then 5 on

if 5=off then 5 off

same for rest

 

Hopefully this helps you know what I am trying to do.

 

Thanks,

John

0 Kudos
Message 12 of 22
(709 Views)

I just saw this post, yes the numbers are just labels for the reactor sites, note 8 is not used so there are six controls (note they are not indicators buttons on the reactor.

 

Regards,

John

0 Kudos
Message 13 of 22
(707 Views)

@JTShaw wrote:

 

if 1=on then 1&2 turn on

if 2=on then 1&2 turn on

if 1=off both 1&2 are off

if 2=off both 1&2 are off



That is still not clear.  Suppose 1=on and 2=off, then what do you want 1 and 2 to be?

Or 2=on and 1=off, then what?

 

You need to make a truth table for how you want the buttons to interact.

0 Kudos
Message 14 of 22
(694 Views)

If you take the subvi that I created you should be able to do what you want to. I added an example of how to use it with the main vi.

Tim
GHSP
Download All
0 Kudos
Message 15 of 22
(690 Views)

Sorry that's my problem is coming up with a good truth table for when both are already ON. Your last program works perfect, I just need it to do the same for sites 3&4. The rest of them are by themselves, ie 5=on it goes on, 5 goes off it goes off....  My original delemia is when they are both on how to turn them both off when either button is pressed, your program accomplishes this. I have never used the Event structure so I need to read up on the old val/new val stuff.

 

Hopefully this helps you?

 

Thanks,

John

0 Kudos
Message 16 of 22
(688 Views)

My last should be what you are looking for.

Tim
GHSP
0 Kudos
Message 17 of 22
(686 Views)

Hey Tim,

I tried your main with the subvi and it almost works but does funny things. Sometimes a button has to be pressed twice for anything to happen (only buttons 1,2,3,4 the rest seems to work fine. Sometimes only one of the lights goes off see attached. This happened when 3 was turned off, 4 indicator should have also went off. i will try to sort out. I have attached one of your earlier ones but it does not maintain different states and I am not sure why. Say 1 and 2 are on, when any others are pressed 1 and 2 go off. looks like when it goes to another state it turns off ones that were on??

 

Thanks again for your time,

John

Download All
0 Kudos
Message 18 of 22
(673 Views)

Sorry try this one as I changed the top register to a tunnel. Try this one.

0 Kudos
Message 19 of 22
(667 Views)

It looks like you got it working. Do you have any other questions?

Tim
GHSP
0 Kudos
Message 20 of 22
(656 Views)