ProcessSystemEvents will process all of the events in the queue. Timer events
do not queue up though. If you have not processed a timer event on the queue
and another one comes in, it replaces that timer event and the first event
is lost. If we queued up timer events, any program that wasn't keeping up
would eventually lock.
Best Regards,
Chris Matthews
Measurement Studio Support Manager
"Jason Howerton" wrote:
>>When you call ProcessSystemEvents from your callback routine, how many
queued>events will be processed before returning to the callback? >>Lets
say I have a Timer control with a short period (1 second). >Lets also say
you have a seperate callback event continuely reading I/O.> It needs 10 seconds
of uninterruptable time to process the I/O. At the>end of the 10 seconds,
you call ProcessSystemEvents. If it does not process>all the queued timer
events before returning to the routine to do another>10 seconds, the queue
will keep growing and growing until... who knows?>Can you shed any light
on the subject?>Thanks in advance,>Jason>>>"Chris Matthews"
wrote:>>>CVI follows an event driven programming model. The program is run
by processing>events>from UI, timers, etc. one at a time from an event queue.
The event>processing>loop is started by running RunUserInterface() and stopped
by running>QuitUserInterface().> The event loop takes each event off the
queue and processes>it by running>the appropriate callback function for the
event. When the>callback function>is finished, the next event is taken from
the queue and>processed. When>you are inside a callback function, the ProcessSystemEvents>function
can>be used to go and process pending events on the queue before>completing
the>callback functions. For example, if you had a callback function>for
a button>that took a few seconds to execute, the event loop would not>process
any>other events until the that callback completes unless you used>ProcessSystemEvents>or
ProcessDrawEvents to process other events on the queue>inside the callback.>
This is all explained in the online help and the functions>panel help for>ProcessSystemEvents
and ProcessDrawEvents.>>Best Regards,>>Chris Matthews>Measurement>Studio
Support Manager>"MK. TAN" wrote:>>>Hi all,>>Can>anybody
explaine to me what do the >CVI function ProcessSystemEvents()>>actually>does?
Is it a delay? >>And what is te effect if any, does >this>function>has on
the program >or time delay?>>>Thanks,>MK. TAN>