LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure based data processing cannot stop

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!

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

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 

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

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.

 

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

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 

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