Re: TimeSetEvent
- From: Jamie <jamie_ka1lpa_not_valid_after_ka1lpa_@xxxxxxxxxxx>
- Date: Sat, 25 Nov 2006 17:21:38 -0500
Gert Baars wrote:
With TimeSetEvent a Callback function is assignedyou should have a BUSY flag in the call back code.
to execute at an interval.
In the callback a COM-port is polled and data is
processed. A certain loop within the callback
sometimes hangs (or is not exectuted) while
another runs normally. All processing is done within
the intervaltime (20mS). Should certain global
variables be protected to avoid this?
in the start of your code above the Var section
Const Busy :Boolean = false;
Begin
If Busy then Exit else Busy := true;
... do your code
Busy := false;
End;
P.s.
Make sure your compiler is set to have writeable constants.
--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
.
- Follow-Ups:
- Re: TimeSetEvent
- From: Gert Baars
- Re: TimeSetEvent
- References:
- TimeSetEvent
- From: Gert Baars
- TimeSetEvent
- Prev by Date: Re: restart application
- Next by Date: Re: restart application
- Previous by thread: Re: TimeSetEvent
- Next by thread: Re: TimeSetEvent
- Index(es):
Relevant Pages
|