Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Orpheus 3 Timer won´t start

Status
Not open for further replies.

akall

Programmer
Mar 12, 2002
2
SE
I have a timer that only starts occationaly someime it´s start´s and sometime its´s not. It´s a orpheus 3 timer. In orpheus 2 it started every time with the same code why?????

code sample:
TimerHandle := AddTimer(ReadTimeout);
repeat
Application.ProcessMessages;
if OkToReadChar then begin
CurrChar := Ord(ReadChar);
if (CurrChar = StartOfRecChar) then
StartFound := true
else
if (CurrChar = EndOfRecChar) then
EndFound := true
else
if StartFound then
S := S + Chr(CurrChar);
end;
{-Check timer.}
if TimesUp[TimerHandle] then
SetError(trmerrReadDataTimeout, 0);
{-Check for userabort.}
if UserAbort then
SetError(trmerrUserAbort, 0);
until EndFound or TimesUp[TimerHandle] or UserAbort;
StopTimer(TimerHandle);
Application.ProcessMessages;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top