From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Malfunction of Event Structure?

Solved!
Go to solution

Apparently, an event structure keeps listening to events even if the structure should be inactive because it is located in the inactive case of a case structure. See the attached simple example.

 

Any explanations, comments or whatsoever? Is it yet another bug or a meaningful feature of LabVIEW?

 

Thanks,

Peter

0 Kudos
Message 1 of 6
(2,555 Views)

The event structure is doing exactly what it is supposed to do. The event structure is not disabled by the case statement.

0 Kudos
Message 2 of 6
(2,543 Views)
That's not true; have a look at your VI again. It works as expected. I believe you are got confused on how the switch worked. If you switch it on, it does skip the initial while loop and goes directly to the exit loop.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 3 of 6
(2,538 Views)
Solution
Accepted by topic author stoeckel

Peter,

 

to add to Dennis correct post:

You can either unlock the front panel for your events to prevent the event structure to block the front panel or you can unregister from events. The unregister approach requires custom registered events. Please see this KB for instructions. 

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 6
(2,534 Views)

Hello,

 

Peter's VI shows two surprising behaviours:

 

1: it executes the event structure independend of the skip_event_structure input

 

if this is the expectected behaviour, is it documented somewhere? I found this information in the LabVIEW-Help and it might roughly point into the right direction:

Event structures begin waiting for events as soon as the VI runs. For example, if you configure two Event structures within the same Sequence structure to wait for a mouse click on the same front panel object, both Event structures execute as soon as the event occurs for the first time.

 

If any document is available that covers the effect discovered by Peter, please post a link.

Even if it is the expected behaviour, it would be nice to be warened somehow.

 

2: the front panel stays locked after the value change event occurred (the lock frontpanel feature is enabled in the event structure)

 

Does someone have a clue why this happens?

 

 

Regards,

Thomas

0 Kudos
Message 5 of 6
(2,504 Views)

ThHagel wrote:

1: it executes the event structure independend of the skip_event_structure input


The event is not skipped. Events don't adhere to dataflow, so you are well advised not to bury them inside case structures.


ThHagel wrote:

2: the front panel stays locked after the value change event occurred (the lock frontpanel feature is enabled in the event structure)


If the "lock front panel" is enabled, the front panel wil lock until the event completes, which is this case is "never". It will be locked forever because the event structure is not in the dataflow.

 

Message 6 of 6
(2,486 Views)