12-10-2007 06:35 AM
12-10-2007 07:52 AM
Event structure is for processing user events (mostly) which means that you should not have parallel events (can not click on 2 or 3 at same time or even several ms apart). You should consider a queued event drivrn state machine if you dont want to miss any events. Event cases will not have code but pass messages to a state machnie via a queue for processing, here you will have a very responsive system with event buffering. What exactly are you trying to do?
Paul
12-10-2007 08:04 AM
12-10-2007 09:48 AM
12-10-2007 10:15 AM
12-10-2007 10:21 AM
I was not refereing to placing an event in two seperate cases when refering to parallel events I was stating that a user can not change 2 button values at the same time. User events will only happen 1 at a time since an event is generated 1 at a time. Future OS might change this. Does the event queue miss events closely spaced together when the event locks the front panel? This idea of a queued event structure with a second loop alleviated any event which requires any time to perform an anction, this is why I use this architecture often.
Paul
12-10-2007 10:47 AM
I agree...(5 stars)
But I don't think an event structure can miss an event.. Maybe someone can confirm that or not....
The queue makes the program more flexible and reliable, but for small pieces of code it is an "overkill"
12-10-2007 11:04 AM
I agree here. You cannot "lose" any events. Sometimes this is a problem as demonstrated (and solved) in this old discussion:
http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=207811#M207811
@Pnt wrote:
I agree that you should not have the same event in two different event cases (in parallel), but i disagree that there is possibility to miss an event.
LabVIEW will not allow you to place the same event in multiple event cases anyway, so there is no problem. However there is also no problem having two different event structures listening to the same event.