Hi folks,
This is probably very easy but I haven't found an elegant solution:
I have some variable 'eventtrigger' change a couple of times a second. After running my program for a while - 'eventtrigger' has already been updated a couple of times - I start a subroutine which listens to 'eventtrigger' in an event structure. The problem is that all the updates of 'eventtrigger' that occurred before the subroutine was started are queued up, and so I'm not triggering on what's happening now but on outdated stuff.
So far I clear the event queue by having a do-nothing-but-trigger event structure triggered by 'eventtrigger' in a while loop, plus a timeout event that is just a bit shorter than it takes for 'eventtrigger' to be updated. I stop that while loop when there is a timeout event.
Surely there must be a better way to clear the events that happened before?
Cheers,
WEnte.
Just a remark, I also stumbled over http://forums.ni.com/ni/board/message?board.id=130&thread.id=5544 ... Browser incompatibilities? Are we back in 1998 (this page is best viewed with...)?