06-13-2014 07:32 AM
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
Solved! Go to Solution.
06-13-2014 07:56 AM
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.
06-13-2014 08:22 AM
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
06-13-2014 08:28 AM - edited 06-13-2014 08:28 AM
@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.