11-27-2008 03:57 AM
Hi!
I am using an event case structure in my application, which gets data (via an user event)from an external dll. This is in a while loop, and the incoming data is processed in an other while loop.
My problem is the following. If i want to stop the whole program, than i set the while-exit conditions to TRUE, and Unregister the user event. BUT it seems like the event structure is running on, and the program cannot exit.
Is there any way of forced termination of an event case structure? I know, it is not a cycle, but it does behave like one in my case.
Any ideas?
Thanks in advance!
11-27-2008 04:25 AM
There are two ways to solve your issue:
a) Use the timeout event and check in it for any "exit" condition. This i do not recommend.
b) Create a dedicated exit-event. This can be done using an user event or simply using an exit-button (UI events). This is the way i recommend.
hope this helps,
Norbert
11-27-2008 04:33 AM
I use a menu, and the event structure handles the Exit-event of this menu. It works well, all the sub cycles stop, the event-unregistering is done, but the main while loop doesnt stop. The condition is true, but it just doesnt stop.
But if i geerate e new event, for ex. the Exit event again, then the program exits. It seems like the event structure would be waiting for another event to come.
11-27-2008
06:43 AM
- last edited on
06-11-2025
12:18 PM
by
Content Cleaner
It sounds to me that you are running into the caveats of the event structures.
In order to help you further, you have to post your vi.
hope this helps,
Norbert