LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to discard events outside the front most vi? how to track where that event is being registered?

Hi All,

 

I have two VIs Main.vi and subvi.vi. the subvi.vi opens on pressing Open button on Main vi. The issue is once the OPEN button is clicked and the second vi popsup, and then I click the STOP button on Main vi (as in the VIs attached), the event gets registered, but we are not able to track where it is being registered. How to track the event being registered? Thank you all in advance.

 

Regards,

Pradeep,

WPG System.

Download All
0 Kudos
Message 1 of 4
(2,687 Views)

The problem here is that your subVI is a synchronous call. If you turn on Highlight Execute on the Main VI, you will notice that execution remains inside the '"OPEN": Value Change' event case until the SubVI finishes executing. Even though you click on the STOP button and the '"stop": Value Change' event is queued into the Main VI event handling queue, that STOP event cannot be handled until the previous case (the one containing the SubVI) has been handled.

0 Kudos
Message 2 of 4
(2,686 Views)

Try separating event structure from event handle code.

You may refer to File>>New>>VI>>From Template>>Frameworks>>Design Patterns>>Producer/Consumer Design Pattern (Events)

0 Kudos
Message 3 of 4
(2,657 Views)

hi, thanks for the reply. But can you please tell me how do i implement it? thanks in advance.

0 Kudos
Message 4 of 4
(2,639 Views)