07-14-2010 09:29 PM
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.
07-14-2010 09:34 PM
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.
07-15-2010 10:17 PM
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)
07-19-2010 01:32 AM
hi, thanks for the reply. But can you please tell me how do i implement it? thanks in advance.