LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control/Indicator problem (double dependencies)

Hi!


Problem 1:

This is what I want to do:

I have two boolean controls, both has modes ON/OFF. If switch 1 is ON switch 2 should always be OFF but if switch 1 is OFF, switch 2 should can be ON or OFF. So, no problem with doing this right? Well, I also want switch 2 to remember what mode it was in if I go from On to OFF on switch 1.

Problem 2:

I have a "Exit" item in my menu and a local variable "Stop" (which comes from a STOP button). When the Exit menu event fires, it sets the local variable to true and the while loops should stop. It works fine except that I have to select Exit in the menu twice?? Hmm.

Huge thanks in advance,

/Thomas
0 Kudos
Message 1 of 3
(2,827 Views)
What do u think about this?

Look attached example
0 Kudos
Message 2 of 3
(2,827 Views)
Tobe a écrit:

>Hi!
>
>
Hi !

>Problem 1:
>This is what I want to do:
>I have two boolean controls, both has modes ON/OFF. If switch 1 is ON
>switch 2 should always be OFF but if switch 1 is OFF, switch 2 should
>can be ON or OFF. So, no problem with doing this right? Well, I also
>want switch 2 to remember what mode it was in if I go from On to OFF
>on switch 1.
>
I supose you are implementing this in a state machine - use shift
registers to keep memory of your control's previous value. It becomes
very easy to associate actions (like ensuring constant value of another
control or storing its value at the time of the change) with both states
and state transitions of a terminal.

>Problem 2:
>
>I have a "Exit" item in my menu and a local variable "St
op" (which
>comes from a STOP button). When the Exit menu event fires, it sets the
>local variable to true and the while loops should stop. It works fine
>except that I have to select Exit in the menu twice?? Hmm.
>
If a true token would really make it to the "end of loop" test it should
really stop. The contrary is miracle (while loop resurection, call it).
Did you actually see that in debug mode ?

oz
0 Kudos
Message 3 of 3
(2,827 Views)