LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem: ONE latch button should manage some different functions at different times??

The problem is that in my VI i have one latch button which should manage 3 functions (a set/reset VI,...) and this 3 functions should be executed by this latch button at different times but the button should be pressed only one time! i think its a simple problem but i can't find a solution
0 Kudos
Message 1 of 2
(2,259 Views)
If I don't misundertand your question, I think you are trying to implement a
state machine here and the latch button behaves like a trigger (to the next
state), and you have 3 states (3 functions). You can create a create an
integer local variable (from control or indicator). This variable will
determine the next state of your latch button once it's pressed. In terms of
code, this is what I mean:
1. wire your latch button to a Case structure
2. inside the True option, wire this local integer to another Case structure
3. There should be 3 Cases for this local integer, the current value of the
integer will determine which function to be executed
4. Put the local integer inside this case structure also, update this local
integer so that when another push of your button comes
it will execute
another function.

I can show you some code if you think I understand your question right and
you are not sure what I am talking about. Let me know if this helps,

Nam.

magmess wrote in message
news:5065000000080000007F3D0000-1012609683000@exchange.ni.com...
> The problem is that in my VI i have one latch button which should
> manage 3 functions (a set/reset VI,...) and this 3 functions should be
> executed by this latch button at different times but the button should
> be pressed only one time! i think its a simple problem but i can't
> find a solution
0 Kudos
Message 2 of 2
(2,259 Views)