Re: priority in events
You cannot prioritize the events handled by the event structure. The events will always be handled in a FIFO like manner. There seems to be no other method than Abort VI to terminate an event. If you need to reorder the events you have to use your own queue and a state machine to do that. Also long running events need to check a signal like a notifier. Waldemar
priority in events
Hi there, when using the event structure is there a way to interrupt a certain event for a more important one? For instance the stop button, no matter what the program is doing it should immediately stop. Thanks
Re: priority in events
The abort button will stop the VI immediatly regardless what the VI is doing (tested with the Wait (ms) function). I think this is true even for the Abort VI Method. Waldemar
Re: priority in events
Ok so stopping is possible, but what about events with priority settings is that possible?
Re: priority in events
I am not sure you can control which event goes first when multiple comes in at the same time. Event should be use to handle simple tasks. Any time intensive / consuming operations should be put into a separate case, or even better a loop, you can put some checks there to skip them should a more important Event is detected. Joe
Re: priority in events
We use a queue to queue up states for a seperate state machine. The event handler only adds states to the queue. I know that it sounds a little awkward, but it has many advantages since you can take things out of the queue or put things in the front of the queue. When it come right down to it, you can also interrupt what's happening in the state machine. This might be an architecture that you could use to re-order how things happen. Rob