LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to start two different event-loops depending on tab-selection

Solved!
Go to solution

Hello,

i have a tab-control with two tabs and various controls and indicators on it.

In the background is a while-loop that contains an event-structure that reacts on the different button-"value-change"-events.

There is one "Close"-button on the panel that stops the while-loop.

 

Now the question:

How can i add a second while-loop with a second event-structure and depending on the tab-selection the corresponding while-loop should execute.

Reason is that i would like to separate the events of the two tabs.

I think it´s possible to wire the stop-loop to the tab-value but how to restart the loop?

 

Thx for help

 

0 Kudos
Message 1 of 4
(2,125 Views)

What's wrong with having just the one event structure?  You are not gaining anything by separating them into two event structures.  You are just adding unnecessary complexity.  Keep it as one structure.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,120 Views)

I tried to separate it as there is an event thats not working to find out why.

Why is the event in the attachment to executing?

If i wire the right side to property DI_1:ValueSignaling then it is always executing and can only be stopped by taskmanager...

Thx

0 Kudos
Message 3 of 4
(2,114 Views)
Solution
Accepted by topic author OnlyOne

@OnlyOne wrote:

Why is the event in the attachment to executing?

If i wire the right side to property DI_1:ValueSignaling then it is always executing and can only be stopped by taskmanager...

Thx


Because every time you write to the Value Signaling property, and event is queued up.  This happens even if the value did not change.  You probably want to add a feedback node or shift register to keep track of the LED status.  XOR the current value with the previous.  If the XOR is true, that means that the value changed.  Only write to the property node when the value changes.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 4
(2,110 Views)