02-01-2024 03:15 PM
I'm having trouble with this sequenced event structure. Upon execution, I select my text ring then the panel freezes.
Occurs in both 2020 and 2023 version.
Thoughts?
Appreciated.
Solved! Go to Solution.
02-01-2024 03:43 PM
Turn off the "Lock panel" option on the Ring value change case:
02-01-2024 03:56 PM
Thank you!
02-01-2024 04:14 PM - edited 02-01-2024 04:15 PM
The "don't lock panel" is a very (very!!!) poor "bandaid" solution, it does not really solve your problem of your incorrect and highly flawed code architecture.
An event structure will queue up events even it they cannot be handled due to dataflow issues, so you need to solve the dataflow issues!
Event structures should never (never ever!!!) be hidden in structures (case, sequence, other event structures, etc.). They need to be ready to handle events and should not rely on dataflow to occasionally get a chance.
This leaves us to the problem you are trying to solve. I am sure once you explain WHAT you want to do (not HOW you want to do it!), we can give you a perfect solutions that is much (much!!!) less complicated.
02-02-2024 06:15 AM
@samwarr11 wrote:
- This occurs when I have two event structures in series where the ring value change event is included in the second event structure
Don't have 2 Event structures in the same VI.
02-03-2024 02:02 PM
@Yamaeda wrote:
Don't have 2 Event structures in the same VI.
Most of my code has at least two event structures. There is no problem having several as long as the architecture is fine. For example I have a main value change event for "checkbox X" to do all the dependent math, and a UI helper loop with the same event to update visibility, etc. of other front panel elements). This help separation between UI and math and keeps the main event structure clean.
(One thing to be aware is that discarded filtering events (e.g. "panel close?") will only be seen by one, because whatever event structure sees it first will discard it and the other event structure will never even see it. Easy to code around once we know that 😄 )
So: don't have more than one event structure in the same loop and make sure that each event structure is always ready to react, that events don't contain interactive inner code, and that events complete quickly (<<<1s) on their own.
02-05-2024 06:12 AM - edited 02-05-2024 06:13 AM
@altenbach wrote:
@Yamaeda wrote:
Don't have 2 Event structures in the same VI.Most of my code has at least two event structures. There is no problem having several as long as the architecture is fine. For example I have a main value change event for "checkbox X" to do all the dependent math, and a UI helper loop with the same event to update visibility, etc. of other front panel elements). This help separation between UI and math and keeps the main event structure clean.
(One thing to be aware is that discarded filtering events (e.g. "panel close?") will only be seen by one, because whatever event structure sees it first will discard it and the other event structure will never even see it. Easy to code around once we know that 😄 )
So: don't have more than one event structure in the same loop and make sure that each event structure is always ready to react, that events don't contain interactive inner code, and that events complete quickly (<<<1s) on their own.
Yes, exactly. But you know what you're doing. 😄